#7913 closed defect (bug) (fixed)
Nouveau - Ajax error while leaving the group
| Reported by: | dullowl | Owned by: | r-a-y |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.2.0 |
| Component: | Templates | Version: | 3.0.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Ajax returns error Error Leaving Group. when trying to leave the group by pressing Leave group button. Here's the screen recording: https://i.imgur.com/iG36onc.gif
Buddypress version 3.1.0
WordPress version 4.9.6
Clean installation, no any other plugins or changes in the code.
Attachments (1)
Change History (6)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Thanks for reporting. I believe this is a bug.
In https://buddypress.trac.wordpress.org/browser/trunk/src/bp-templates/bp-nouveau/includes/groups/ajax.php#L209 we have
Which I believe the contributors forgot to check if the group leave function was not successful (negate their conditional check), that is when the error should be returned.
So instead it should be:
if ( ! groups_leave_group( $group->id ) ) {This fixes the issue for me on a development environment.