This is both the bug report and the fix.
The bug is that once a group changes the setting from to any other available role, the role can only be changed to another role but not back to (just doesn't save it). This was caused by a problem in the SQL update. As my programming student told me:
empty($arg) also returns true for the argument 0, so the default value (0) cannot be set again
It's an old bug that existed already in 4.0-dev, and we found it during the upgrade. See the attached patch for the solution implemented in our project :) Thx.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | og_user_roles-HEAD.default-group-role.1.patch | 1.44 KB | sun |
| default_default_role.patch | 1.59 KB | itsnotme |
Comments
Comment #1
sunThanks for reporting, reviewing, and testing! Committed.
A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.
...which means !empty() is correct for the insert case, as we don't want to insert 0.
Powered by Dreditor.