estorde Posted January 21, 2019 Share Posted January 21, 2019 Hi, I have a Prestashop 1.7.5.0 installation, when I do try to edit the User Permissions at the Backend, I´m getting this error: Notice en línea 199 en archivo /home/bnacdn3a/public_html/controllers/admin/AdminAccessController.php [8] Undefined index: name It´s a new installation and I do not modify the "AdminAccessController.php" file. In line 199 is writing: return strnatcmp($a['name'], $b['name']); 197- private function sortModuleByName($a, $b) 198- { 199- return strnatcmp($a['name'], $b['name']); 200- } Link to comment Share on other sites More sharing options...
Klemart3D Posted February 12, 2019 Share Posted February 12, 2019 (edited) Exactly the same for me but in french: Notice à la ligne 199 du fichier /vagrant/httpdocs/controllers/admin/AdminAccessController.php [8] Undefined index: name If, line 199 of AdminAccessController.php file I do a var_dump($a); it seems some values doesn't have expected "name" attribute: So to fix warning tentatively, you can do: if (isset($a['name']) && isset($b['name'])) { return strnatcmp($a['name'], $b['name']); } To know which module is, you can add into Module.php line 2643 (into getModulesAccessesByIdProfile method) before "return $roles" : var_dump($roles);die(); It give me a list of modules with their permissions : In my case, the two last ("ETRANSACTIONSEPAYMENT" and "MENUFOOTER") doesn't have a name or an id. I tried reinstall them but it doesn't works better, so I deleted lines of ps_authorization_role table with the name of module into `slug` column and now.. it works like a charm ! But seems to be an old bug , I found another unsresolved topic from march 2017 here: Edited February 12, 2019 by Klemart3D (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now