Jump to content

Featured Replies

Posted

hi team - in system/application/applications.php there is a function which looks for can_manage_sidebar

 

public function canManageWidgets( Member $member=NULL ): bool

this calls in the end system/member/member.php:

 

public function modPermission( string $key=NULL ): mixed

If 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

  • 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

image.png

  • 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 by Philip_B

  • 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.

  • 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.

Recently Browsing 0

  • No registered users viewing this page.