revolution icon indicating copy to clipboard operation
revolution copied to clipboard

Error on remove access group policy

Open theuros opened this issue 3 years ago • 4 comments

Bug report

Summary

Error on remove access group policy when you edit any user group.

Step to reproduce

Create and try to delete resource group policy under tab "Access Permissions" under "Resource groups"

Observed behavior

Popup window displays: Error: Requested processor nor found. image Error log: [2022-07-28 14:37:54] (ERROR @ /www/core/src/Revolution/modX.php : 1784) Unable to load processor for action "security/access/usergroup/resourcegroup/remove", it does not exist as an autoloadable class that extends \MODX\Revolution\Processors\Processor, and also not as a file in "/www/core/src/Revolution/Processors/security/access/usergroup/resourcegroup/remove.class.php"

Expected behavior

Resource group should be removed

Environment

Modx 3.0.1-pl PHP 8.1 Nginx Hosted on modx cloud

theuros avatar Aug 02 '22 13:08 theuros

I believe it is a problem with the capitalization (lowercase/uppercase letters).

Can you change this line in the code

https://github.com/modxcms/revolution/blob/5e3c5eaca9a9e6cf3ebf0f7eb142fb4506534fb9/core/src/Revolution/Processors/Security/Access/UserGroup/ResourceGroup/GetList.php#L148

to

'handler' => 'this.confirm.createDelegate(this,["Security/Access/UserGroup/ResourceGroup/Remove"])',

and check if that helps?

halftrainedharry avatar Aug 02 '22 13:08 halftrainedharry

Yes it helped, after changing that line I was able to remove it.

theuros avatar Aug 02 '22 14:08 theuros

FYI, on a local testing install of the current dev branch (running just apache, not nginx), I can not replicate this issue. So it seems the case sensitivity has to do with the environment.

@opengeek @Mark-H - Should we comb through the 3.x code for casing mismatches such as this and update to match the current casing convention?

smg6511 avatar Aug 02 '22 14:08 smg6511

I don't think there should be many left as we caught a lot of these sort of issues during the alpha/beta phase so my initial thought would be to take it one report at a time... but obviously there's nothing wrong with doing a good search to try and find any other left overs either.

Just do mind the difference between processor actions (uppercase) and manager controllers (still lowercase). They sometimes look very similar when doing a code search.

Mark-H avatar Aug 02 '22 15:08 Mark-H

Fixed #16246

Ibochkarev avatar Aug 24 '22 05:08 Ibochkarev