acl_extras icon indicating copy to clipboard operation
acl_extras copied to clipboard

ACL not syncing

Open HelLViS69 opened this issue 10 years ago • 9 comments

Hi, I've succesfully setup my ACLs using Cake 2.3, now I just upgraded to Cake 2.5.4 and aco_update / aco_sync stop execution after the first controller with this error:

Error: Class GroupsController does not exist #0 /var/www/www.site.org/net/Plugin/AclExtras/Lib/AclExtras.php(234): ReflectionClass->__construct('GroupsControlle...') #1 /var/www/www.site.org/net/Plugin/AclExtras/Lib/AclExtras.php(271): AclExtras->_getCallbacks('GroupsControlle...') #2 /var/www/www.site.org/net/Plugin/AclExtras/Lib/AclExtras.php(166): AclExtras->_checkMethods('GroupsControlle...', 'Groups', Array, NULL) #3 /var/www/www.site.org/net/Plugin/AclExtras/Lib/AclExtras.php(118): AclExtras->_updateControllers(Array, Array) #4 /var/www/www.site.org/net/Plugin/AclExtras/Lib/AclExtras.php(105): AclExtras->aco_update(Array) #5 /var/www/www.site.org/net/Plugin/AclExtras/Console/Command/AclExtrasShell.php(64): AclExtras->aco_sync(Array) #6 /var/www/www.site.org/lib/Cake/Console/Shell.php(437): AclExtrasShell->aco_sync() #7 /var/www/www.site.org/lib/Cake/Console/ShellDispatcher.php(209): Shell->runCommand('aco_sync', Array) #8 /var/www/www.site.org/lib/Cake/Console/ShellDispatcher.php(66): ShellDispatcher->dispatch() #9 /var/www/www.site.org/net/Console/cake.php(47): ShellDispatcher::run(Array) #10 {main}

This happens also with Cake 2.4.10

HelLViS69 avatar Sep 12 '14 12:09 HelLViS69

Does that controller exist?

markstory avatar Sep 12 '14 16:09 markstory

Yeah, the controller exists.. it was implemented following the tutorial on cakephp site

HelLViS69 avatar Sep 12 '14 16:09 HelLViS69

It looks like the shell can't find it for some reason then.

markstory avatar Sep 12 '14 16:09 markstory

It worked well from Cake 2.1 to Cake 2.3.. I think something has changed in Cake 2.4

HelLViS69 avatar Sep 12 '14 17:09 HelLViS69

Any clue?

HelLViS69 avatar Oct 08 '14 01:10 HelLViS69

Not really.

markstory avatar Oct 08 '14 02:10 markstory

aco_update now prints this line: PHP Notice: Constant DS already defined in /var/www/www.site.org/lib/Cake/Console/ShellDispatcher.php on line 84

then prints the code of the controller it says it doesn't exist and the error above

HelLViS69 avatar Oct 09 '14 23:10 HelLViS69

Received following error with Cake 2.10.9 version when I ran ./Console/cake AclExtras.AclExtras aco_sync though I have DecisionsController in app/Controller. I could not find a solution for this problem in this thread

Error: Class DecisionsController does not exist #0 /conundrum/gotd_vX/app/Plugin/AclExtras/Lib/AclExtras.php(235): ReflectionClass->__construct('DecisionsContro...') #1 /conundrum/gotd_vX/app/Plugin/AclExtras/Lib/AclExtras.php(272): AclExtras->_getCallbacks('DecisionsContro...') #2 /conundrum/gotd_vX/app/Plugin/AclExtras/Lib/AclExtras.php(167): AclExtras->_checkMethods('DecisionsContro...', 'Decisions', Array, NULL) #3 /conundrum/gotd_vX/app/Plugin/AclExtras/Lib/AclExtras.php(119): AclExtras->_updateControllers(Array, Array) #4 /conundrum/gotd_vX/app/Plugin/AclExtras/Lib/AclExtras.php(106): AclExtras->aco_update(Array) #5 /conundrum/gotd_vX/app/Plugin/AclExtras/Console/Command/AclExtrasShell.php(64): AclExtras->aco_sync(Array) #6 /conundrum/gotd_vX/lib/Cake/Console/Shell.php(459): AclExtrasShell->aco_sync() #7 /conundrum/gotd_vX/lib/Cake/Console/ShellDispatcher.php(219): Shell->runCommand('aco_sync', Array) #8 /conundrum/gotd_vX/lib/Cake/Console/ShellDispatcher.php(66): ShellDispatcher->dispatch() #9 /conundrum/gotd_vX/app/Console/cake.php(47): ShellDispatcher::run(Array) #10 {main}

reetak18 avatar Jun 06 '18 20:06 reetak18

My problem is solved. aco table is populated successfully using AclExtras plugin. The reason behind the problem:- Code of Controller files for example "DecisionsController.php" if was inside just ?> then AclExtras was not able to find these files. When put code inside , then everything was fine.

reetak18 avatar Jun 07 '18 00:06 reetak18