Jump to content

Error when adding new customer in backend


Recommended Posts

Hi,
I'have error when i'm adding new customer in backend. After turning on errors I get sth like this:

[PrestaShopDatabaseException]

Table 'magnitica_prestat.ps_tab_module_preference' doesn't exist


			SELECT module
			FROM ps_tab_module_preference
			WHERE `id_tab` = 38
			AND `id_employee` = 4

at line 613 in file classes/db/Db.php
607. 			WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
608. 		}
609. 		else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
610. 		{
611. 			if ($sql)
612. 				throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
613. 			throw new PrestaShopDatabaseException($this->getMsgError());
614. 		}
615. 	}
616. 
617. 	/**
DbCore->displayError - [line 313 - classes/db/Db.php] - [1 Arguments]
DbCore->query - [line 488 - classes/db/Db.php] - [1 Arguments]
DbCore->executeS - [line 534 - classes/Tab.php] - [1 Arguments]
TabCore::getTabModulesList - [line 1524 - classes/controller/AdminController.php] - [1 Arguments]
AdminControllerCore->initTabModuleList - [line 1482 - classes/controller/AdminController.php] - [0 Argument]
AdminControllerCore->initContent - [line 182 - controllers/admin/AdminCustomersController.php] - [0 Argument]
AdminCustomersControllerCore->initContent - [line 167 - classes/controller/Controller.php] - [0 Argument]
ControllerCore->run - [line 348 - classes/Dispatcher.php] - [0 Argument]
DispatcherCore->dispatch - [line 53 - admin5331/index.php] - [0 Argument]

Can You please help me ?

Regards 

Aga

Link to comment
Share on other sites

Looks like that table is missing from your DB.

 

While it can mean other things are missing, you can create that table by running the following query in your DB (using phpMyAdmin)

 

 

 
CREATE TABLE IF NOT EXISTS `ps_tab_module_preference` (
  `id_tab_module_preference` int(11) NOT NULL AUTO_INCREMENT,
  `id_employee` int(11) NOT NULL,
  `id_tab` int(11) NOT NULL,
  `module` varchar(255) NOT NULL,
  PRIMARY KEY (`id_tab_module_preference`),
  UNIQUE KEY `employee_module` (`id_employee`,`id_tab`,`module`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
Link to comment
Share on other sites

×
×
  • Create New...