Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted February 23Feb 23 hi team - in system/application/applications.php there is a function which looks for can_manage_sidebar public function canManageWidgets( Member $member=NULL ): boolthis calls in the end system/member/member.php: public function modPermission( string $key=NULL ): mixedIf the permission is not found NULL is returned and you end up with exceptions like Return value must be of type bool, null returned return $permissions[$key] ?? NULL;How can I add this permission? Checked group JSON and dont see any with this permission, editting the group in the ACP also doesnt look to have this setting
February 23Feb 23 Author This is set when editing moderators in the ACP. Looks like a default is not set which is flagging this error. Looks to be a bug, let me know how to proceed without editing every moderators. Working out a runbook for an upgrade so flagging a few issues in a test install
February 23Feb 23 Author when editing the group or individual a much richer JSON is saved down with all the permissions which fixes the problem as it can now find can_manage_sidebar Edited February 23Feb 23 by Philip_B
February 23Feb 23 Community Expert I posted a bug report about this issue ~15 minutes ago before seeing your topic. 😅The bug report starts from publishing future topics, but the root issue is the same with modPermission() returning a NULL value.
February 23Feb 23 Author fantastic 🤣I managed to get around this by saving down the restricted moderator again which saves down all the required JSON settings. Not ideal and will be time consuming if I need to do this on all 70 rows.