kostek.162 Posted August 17, 2022 Share Posted August 17, 2022 When I wan to see AdminStats module in this case Users Online on Admin page I get: The slug ROLE_MOD_TAB__READ is invalid [Exception 0] It is thrown in Access.php in line 74: public static function isGranted($role, $idProfile) { foreach ((array) $role as $currentRole) { preg_match( '/ROLE_MOD_(?P<type>[A-Z]+)_(?P<name>[A-Z0-9_]+)_(?P<auth>[A-Z]+)/', $currentRole, $matches ); if (isset($matches['type']) && $matches['type'] == 'TAB') { $joinTable = _DB_PREFIX_ . 'access'; } elseif (isset($matches['type']) && $matches['type'] == 'MODULE') { $joinTable = _DB_PREFIX_ . 'module_access'; } else { throw new Exception('The slug ' . $currentRole . ' is invalid'); } $currentRole = Db::getInstance()->escape($currentRole); $isCurrentGranted = (bool) Db::getInstance()->getRow(' SELECT t.`id_authorization_role` FROM `' . _DB_PREFIX_ . 'authorization_role` t LEFT JOIN ' . $joinTable . ' j ON j.`id_authorization_role` = t.`id_authorization_role` WHERE `slug` = "' . $currentRole . '" AND j.`id_profile` = "' . (int) $idProfile . '" '); if (!$isCurrentGranted) { return false; } } return true; } When I comment out all function body and leave only return true, it starts working. But it;s only temporay solution I guess. Any sugestions? Link to comment Share on other sites More sharing options...
bera_ramazan Posted June 27 Share Posted June 27 please edit config.inc.php $locale = strtolower(Configuration::get('PS_LOCALE_LANGUAGE')) . '_' . strtoupper(Configuration::get('PS_LOCALE_COUNTRY')); to $locale = 'en_en'; 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