Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Some kind of permission issue in 2.5

This discussion is related to the IndexDiscussionImage addon.
pitkmipitkmi scifi-meshes.com

Just updated to 2.5, and while most things seem to run smoothly(ish), but I'm running into this error, when I try to enable the discussion images:

PermissionModel->PermissionModel::define was called with an invalid $PermissionNames parameter.

Looking at the code, the only permissions mentioned in there are 'Garden.Settings.Manage'.

I did have a look at general-2-5-plugin-compatibility-issues for advice, but it looks like this is a different issue.

Any idea where I should look?

Comments

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    You need to set permissions in the settings for roles. Garden settings manage is a permission for admin or anyone you give admin role.

  • pitkmipitkmi scifi-meshes.com

    That's what I thought, but admins are set up with both Manage and View Settings permissions already.

  • R_JR_J Ex-Fanboy Munich Admin

    PermissionModel::define is called when an entry like 'RegisterPermissions' => whatever, is found in the PluginInfo array. Looking at the plugin, I see 'RegisterPermissions' => "Garden.Settings.Manage", which tries to define a permission which already exists. I guess that's the problem.

    Please try commenting out line 6 in class.indexdiscussionimage.plugin.php so that it reads:

       // 'RegisterPermissions' => "Garden.Settings.Manage",
    

    Maybe you have to delete /cache/addon.php afterwards.

  • pitkmipitkmi scifi-meshes.com

    Commenting out RegisterPermissions and deleting cache/addon.php did the trick. Thanks for your help @R_J.

    R_J
Sign In or Register to comment.