Jump to content

Recommended Posts

 Hello.This is the result after a backup on prestashop 1.6 It seems that i have a controller problem as in the log file:

PHP Notice:  /classes/controller/FrontController.php on line 370

and finaly i got this and returned with the inicial problem and worst. I can see my shop but i can"t acces the BO. I"m a newbie on this and some help is needed to understand how to fix this please. [PrestaShopException]

No access reference in table module_access for id_module 74.
at line 2030 in file classes/module/Module.php

2024. 				self::$cache_permissions[$employee->id_profile][$row['id_module']]['configure'] = $row['configure'];2025. 			}2026. 		}2027. 2028. 		if (!isset(self::$cache_permissions[$employee->id_profile][$id_module]))2029. 			throw new PrestaShopException('No access reference in table module_access for id_module '.$id_module.'.');2030. 2031. 		return (bool)self::$cache_permissions[$employee->id_profile][$id_module][$variable];2032. 	}2033. 2034. 	/**
  • ModuleCore::getPermissionStatic - [line 2764 - classes/controller/AdminController.php] - [2 Arguments]
    2758. 		$this->modules_list = array();2759. 		foreach ($all_modules as $module)2760. 		{2761. 			$perm = true;2762. 			if ($module->id)2763. 				$perm &= Module::getPermissionStatic($module->id, 'configure');2764. 			else2765. 			{2766. 				$id_admin_module = Tab::getIdFromClassName('AdminModules');2767. 				$access = Profile::getProfileAccess($this->context->employee->id_profile, $id_admin_module);2768. 				if (!$access['edit'])
  • AdminControllerCore->getModulesList - [line 1914 - classes/controller/AdminController.php] - [1 Arguments]
    1908. 							$this->list_natives_modules[] = (string)$value;1909. 						if ($xmlModule->attributes() == 'partner' && $key == 'name')1910. 							$this->list_partners_modules[] = (string)$value;1911. 					}1912. 1913. 		if ($this->getModulesList($this->filter_modules_list))1914. 		{1915. 			foreach ($this->modules_list as $key => $module)1916. 			{1917. 				if (in_array($module->name, $this->list_partners_modules))1918. 					$this->modules_list[$key]->type = 'addonsPartner';
  • AdminControllerCore->renderModulesList - [line 1757 - classes/controller/AdminController.php]
    1751. 		{1752. 			$this->content .= $this->renderDetails();1753. 		}1754. 		elseif (!$this->ajax)1755. 		{1756. 			$this->content .= $this->renderModulesList();1757. 			$this->content .= $this->renderKpis();1758. 			$this->content .= $this->renderList();1759. 			$this->content .= $this->renderOptions();1760. 1761. 			// if we have to display the required fields form
  • AdminControllerCore->initContent - [line 121 - controllers/admin/AdminLoginController.php]
    115. 		if ($password = Tools::getValue('password'))116. 			$this->context->smarty->assign('password', $password);117. 118. 		$this->setMedia();119. 		$this->initHeader();120. 		parent::initContent();121. 		$this->initFooter();122. 	}123. 	124. 	public function checkToken()125. 	{
  • AdminLoginControllerCore->initContent - [line 180 - classes/controller/Controller.php]
    174. 175. 			if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))176. 				$this->initHeader();177. 178. 			if ($this->viewAccess())179. 				$this->initContent();180. 			else181. 				$this->errors[] = Tools::displayError('Access denied.');182. 183. 			if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className)))184. 				$this->initFooter();
  • ControllerCore->run - [line 373 - classes/Dispatcher.php]
    367. 			// Execute hook dispatcher368. 			if (isset($params_hook_action_dispatcher))369. 				Hook::exec('actionDispatcher', $params_hook_action_dispatcher);370. 371. 			// Running controller372. 			$controller->run();373. 		}374. 		catch (PrestaShopException $e)375. 		{376. 			$e->displayMessage();377. 		}

 

Edited by DanielP (see edit history)
Link to comment
Share on other sites

 

 Hello.This is the result after a backup on prestashop 1.6 It seems that i have a controller problem as in the log file:

PHP Notice:  /classes/controller/FrontController.php on line 370

and finaly i got this and returned with the inicial problem and worst. I can see my shop but i can"t acces the BO. I"m a newbie on this and some help is needed to understand how to fix this please. [PrestaShopException]

No access reference in table module_access for id_module 74.

at line 2030 in file classes/module/Module.php

2024. 				self::$cache_permissions[$employee->id_profile][$row['id_module']]['configure'] = $row['configure'];2025. 			}2026. 		}2027. 2028. 		if (!isset(self::$cache_permissions[$employee->id_profile][$id_module]))2029. 			throw new PrestaShopException('No access reference in table module_access for id_module '.$id_module.'.');2030. 2031. 		return (bool)self::$cache_permissions[$employee->id_profile][$id_module][$variable];2032. 	}2033. 2034. 	/**
  • ModuleCore::getPermissionStatic - [line 2764 - classes/controller/AdminController.php] - [2 Arguments]
    2758. 		$this->modules_list = array();2759. 		foreach ($all_modules as $module)2760. 		{2761. 			$perm = true;2762. 			if ($module->id)2763. 				$perm &= Module::getPermissionStatic($module->id, 'configure');2764. 			else2765. 			{2766. 				$id_admin_module = Tab::getIdFromClassName('AdminModules');2767. 				$access = Profile::getProfileAccess($this->context->employee->id_profile, $id_admin_module);2768. 				if (!$access['edit'])
  • AdminControllerCore->getModulesList - [line 1914 - classes/controller/AdminController.php] - [1 Arguments]
    1908. 							$this->list_natives_modules[] = (string)$value;1909. 						if ($xmlModule->attributes() == 'partner' && $key == 'name')1910. 							$this->list_partners_modules[] = (string)$value;1911. 					}1912. 1913. 		if ($this->getModulesList($this->filter_modules_list))1914. 		{1915. 			foreach ($this->modules_list as $key => $module)1916. 			{1917. 				if (in_array($module->name, $this->list_partners_modules))1918. 					$this->modules_list[$key]->type = 'addonsPartner';
  • AdminControllerCore->renderModulesList - [line 1757 - classes/controller/AdminController.php]
    1751. 		{1752. 			$this->content .= $this->renderDetails();1753. 		}1754. 		elseif (!$this->ajax)1755. 		{1756. 			$this->content .= $this->renderModulesList();1757. 			$this->content .= $this->renderKpis();1758. 			$this->content .= $this->renderList();1759. 			$this->content .= $this->renderOptions();1760. 1761. 			// if we have to display the required fields form
  • AdminControllerCore->initContent - [line 121 - controllers/admin/AdminLoginController.php]
    115. 		if ($password = Tools::getValue('password'))116. 			$this->context->smarty->assign('password', $password);117. 118. 		$this->setMedia();119. 		$this->initHeader();120. 		parent::initContent();121. 		$this->initFooter();122. 	}123. 	124. 	public function checkToken()125. 	{
  • AdminLoginControllerCore->initContent - [line 180 - classes/controller/Controller.php]
    174. 175. 			if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))176. 				$this->initHeader();177. 178. 			if ($this->viewAccess())179. 				$this->initContent();180. 			else181. 				$this->errors[] = Tools::displayError('Access denied.');182. 183. 			if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className)))184. 				$this->initFooter();
  • ControllerCore->run - [line 373 - classes/Dispatcher.php]
    367. 			// Execute hook dispatcher368. 			if (isset($params_hook_action_dispatcher))369. 				Hook::exec('actionDispatcher', $params_hook_action_dispatcher);370. 371. 			// Running controller372. 			$controller->run();373. 		}374. 		catch (PrestaShopException $e)375. 		{376. 			$e->displayMessage();377. 		}

 

Until now i have fund that if y change the file on line :

2024. 				self::$cache_permissions[$employee->id_profile][$row['id_module']]['configure'] = $row['configure'];

to :

 

if (Validate::isLoadedObject($context->employee) && !$moduleInstance->getPermission('view', $context->employee))

 

 

from classes/module/Module.php

 

I can finaly get the login on my BO but the controller is missing and i get stuck there..

 

http://forge.prestashop.com/browse/PSCFV-3312

 

Link to comment
Share on other sites

  • 6 months later...

Until now i have fund that if y change the file on line :

2024. 				self::$cache_permissions[$employee->id_profile][$row['id_module']]['configure'] = $row['configure'];

to :

 

if (Validate::isLoadedObject($context->employee) && !$moduleInstance->getPermission('view', $context->employee))

 

 

from classes/module/Module.php

 

I can finaly get the login on my BO but the controller is missing and i get stuck there..

 

http://forge.prestashop.com/browse/PSCFV-3312

Got the same problem at a local instalation after turing Friendly url on and deleted the htacces file... Did you find a solution?

Link to comment
Share on other sites

×
×
  • Create New...