Manage groups page continues even though group does not exist

Bug #1938231 reported by Ghada El-Zoghbi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Unassigned

Bug Description

Mahara: 20.10.1
OS: Linux
DB: Postgres
Browser: FF and Chrome

A user can bookmark a page for a group and come back to it at a later time after that group has been deleted.

The manage groups page should check that the group still exists and notify the user if doesn't find it.

To replicate:
1. Create a group 'AAA Test' from the page /group/edit
2. As a site admin, go to Administer groups (Admin > Groups > Administer groups)
3. Edit the group 'AAA Test' by clicking on the cog
4. Bookmark the page (for me it's: http://localhost/admin/groups/manage.php?id=283).
5. go back to the Administer groups page and delete the group 'AAA Test'
6. go to the bookmarked page for the deleted group

What should happen:
User should be notified that the group no longer exits

What currently happens:
Warnings appear that group could not be found with a call stack:

Call stack (most recent first):
log_message("Trying to get property 'quotaused' of non-object", 8, true, true, "/siteroot/htdocs/admin/groups/manage.php", 22) at /siteroot/htdocs/lib/errors.php:515
error(8, "Trying to get property 'quotaused' of non-object", "/siteroot/htdocs/admin/groups/manage.php", 22, array(size 58)) at /siteroot/htdocs/admin/groups/manage.php:22

and many more errors as the page continues to display.

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/11876

Changed in mahara:
status: New → In Progress
importance: Undecided → High
milestone: none → 21.10.0
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/11876
Committed: https://git.mahara.org/mahara/mahara/commit/df0d0bd495a9df881939a3517b4f81bab8654471
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit df0d0bd495a9df881939a3517b4f81bab8654471
Author: Ghada El-Zoghbi <email address hidden>
Date: Wed Jul 28 10:02:56 2021 +1000

Bug 1938231: Check group exists before admin edit

Check the group still exists before continuing
to allow the edit of a group

behatnotneeded

Change-Id: I36efe9ca3f593936c296e55fb4aa6e64a0036440

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
summary: - Manage groups page continues eventhough group does not exist
+ Manage groups page continues even though group does not exist
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.