jpcmorais Posted September 23, 2016 Share Posted September 23, 2016 Hi. After the upgrade to the latest version I get this error:[PrestaShopException]Current theme unselected. Please check your theme configuration.at line 117 in file config/config.inc.php112. /* Initialize the current Shop */113. try {114. $context->shop = Shop::initialize();115. $context->theme = new Theme((int)$context->shop->id_theme);116. if ((Tools::isEmpty($theme_name = $context->shop->getTheme()) || !Validate::isLoadedObject($context->theme)) && !defined('_PS_ADMIN_DIR_')) {117. throw new PrestaShopException(Tools::displayError('Current theme unselected. Please check your theme configuration.'));118. }119. } catch (PrestaShopException $e) {120. $e->displayMessage();121. }122. define('_THEME_NAME_', $theme_name); require - [line 27 - index.php]22. * @copyright 2007-2016 PrestaShop SA23. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)24. * International Registered Trademark & Property of PrestaShop SA25. */26.27. require(dirname(__FILE__).'/config/config.inc.php');28. Dispatcher::getInstance()->dispatch(); If I change the Theme to default-bootstrap I get this error: Duplicate entry '28-0-1' for key 'PRIMARY'INSERT INTO `prstshp_hook_module` (`id_module`, `id_shop`, `id_hook`, `position`) VALUES (28, 1, 0, 1) Can someone help me out here? Thanks, João Morais Link to comment Share on other sites More sharing options...
tdr170 Posted September 23, 2016 Share Posted September 23, 2016 what version did you upgrade from and were you using a third party theme. Link to comment Share on other sites More sharing options...
jpcmorais Posted September 23, 2016 Author Share Posted September 23, 2016 I was using the 1.5.3.1 version and the default-bootstrap theme. Link to comment Share on other sites More sharing options...
selectshop.at Posted September 23, 2016 Share Posted September 23, 2016 As your question is in English, I moved it to the English forum section. In other forum sections, please use only the language forseen. Link to comment Share on other sites More sharing options...
selectshop.at Posted September 23, 2016 Share Posted September 23, 2016 Probably you was using non native modules before. You need to disable all them, because they will not work with Prestashop 1.6.x On back-office (if you can access) tab: parametros avancados -> desempenho -> bloco mode de duparacao -> set both to YES and save. For security please clear smarty and browser cache too. Link to comment Share on other sites More sharing options...
jpcmorais Posted September 23, 2016 Author Share Posted September 23, 2016 I did what you told me but still not working. When I change the the theme to default-bootstrap I still get this error: Duplicate entry '28-0-1' for key 'PRIMARY'INSERT INTO `prstshp_hook_module` (`id_module`, `id_shop`, `id_hook`, `position`) VALUES (28, 1, 0, 1) Link to comment Share on other sites More sharing options...
selectshop.at Posted September 23, 2016 Share Posted September 23, 2016 Seems that on your database are duplicate entries for primary keys on prstshp_hook_module. This error says that you are having dublettes in your database. Manipulated manually or due to a table crash on the database. You should check your database for broken tables and repair them. With phpMyAdmin: https://www.siteground.com/tutorials/phpmyadmin/phpmyadmin_optimize_database.htm please check and if there are broken tables, repair them. Link to comment Share on other sites More sharing options...
selectshop.at Posted September 23, 2016 Share Posted September 23, 2016 The Prestashop is trying to add for ID 28 on id_shop 1, the id_hook 0 to position 1. This is what the error is saying. So if table psrstshp_hook_module has already an ID_module 28 added, it is not possible to add, and the error is displaying. As I don't know which module on your database has ID 28, it is difficult to help. You can, AFTER making a BACK-UP of your database try to delete the id_module 28 line. This will remove the error and add the line which he is saying he cannot actually add, cause it is still availabe. BTW, Prestashop has no id_hook 0, so it seems that you are having a module installed, which is working with wrong hooks.... Link to comment Share on other sites More sharing options...
tdr170 Posted September 23, 2016 Share Posted September 23, 2016 (edited) Take a look at the hook and hook module tables you have a module that is tryng to hook into the same position twice or into the same position as a different module. Make a backup by exporting the database before making changes. remove one of the 28, 1, 0, 1 entries. 28 = modules id # 1 = shop 0 = id of hook - looking at the table there is no 0 id for hooks 1 = position of module within the hook location. while you can have a module hooked in several locations (hooks) you can not have 2 modules hooked in the same location. looks like we both were typing at the same time Edited September 23, 2016 by tdr170 (see edit history) Link to comment Share on other sites More sharing options...
jpcmorais Posted September 23, 2016 Author Share Posted September 23, 2016 (edited) There aren't any broken tables. I filtered the prstshp_hook_module table to look for the duplicate entry (28, 1, 0, 1) and this is the result: ----- LINKS deleted ----- Any suggestion? Edited September 23, 2016 by selectshop.at links deleted (see edit history) Link to comment Share on other sites More sharing options...
jpcmorais Posted September 23, 2016 Author Share Posted September 23, 2016 In the hook table the id 28 is: 28 displayProductTab Tabs on product page Called on order product page tabs 1 1 Link to comment Share on other sites More sharing options...
tdr170 Posted September 23, 2016 Share Posted September 23, 2016 (edited) Remove the 28, 1, 0, 1 from the table and try to change the theme, the theme is trying to hook a module to this location. BACKUP FIRST!!!! Edited September 23, 2016 by selectshop.at links deleted (see edit history) Link to comment Share on other sites More sharing options...
jpcmorais Posted September 23, 2016 Author Share Posted September 23, 2016 I removed the 28, 1, 0, 1. I changed the theme and I got the same error. After that I checked the table and the 28,1, 0, 1 appeared again. Link to comment Share on other sites More sharing options...
tdr170 Posted September 23, 2016 Share Posted September 23, 2016 post a snap of the modules table that should tell you what module it is. You may need to uninstall all none native modules as something does not like 1.6 Link to comment Share on other sites More sharing options...
selectshop.at Posted September 23, 2016 Share Posted September 23, 2016 Go to table ps_ module and read there the line with id_module 28. Take a look if the module is active and his name. If on column active this module has 1, change it to 0 for to deactivate it. Let us know the name of the module with the id 28. This module is adding a hook_id with 0, which writtenbefore is not possible, cause Prestashop don't use the hook with ID 0. First hook_id should be 1 and not 0. Link to comment Share on other sites More sharing options...
jpcmorais Posted September 23, 2016 Author Share Posted September 23, 2016 28 displayProductTab Tabs on product page Called on order product page tabs 1 1 Link to comment Share on other sites More sharing options...
tdr170 Posted September 23, 2016 Share Posted September 23, 2016 No, look at modules table not hook_modules this will tell you the module, then from BO uninstall that module. Link to comment Share on other sites More sharing options...
jpcmorais Posted September 23, 2016 Author Share Posted September 23, 2016 28 blocktopmenu 1 2.2.4 Link to comment Share on other sites More sharing options...
selectshop.at Posted September 23, 2016 Share Posted September 23, 2016 Go to table ps_ module and read there the line with id_module 28. Take a look if the module is active and his name. If on column active this module has 1, change it to 0 for to deactivate it. Let us know the name of the module with the id 28. This module is adding a hook_id with 0, which writtenbefore is not possible, cause Prestashop don't use the hook with ID 0. First hook_id should be 1 and not 0. Read the table ps_modules !! not the back-office. Write only which module is written there (name of it) with the id_module 28. Link to comment Share on other sites More sharing options...
selectshop.at Posted September 23, 2016 Share Posted September 23, 2016 OK, so it's blocktopmenu. You have now 2 options: change the activation in ps_modules of this module to 0, or you go to your ftp and delete completely the folder /modules/blocktopmenu. This will make the script inactive at all, and error should disappear. If not, you have to delete smarty cache and browser cache too... Link to comment Share on other sites More sharing options...
tdr170 Posted September 23, 2016 Share Posted September 23, 2016 (edited) uninstall that module and try again, are you seeing an alert that modules need updating on the modules page. You can uninstall and delete this from BO, do not worry the module will re-appear even after deleted so you can re-install if you wish. Edited September 23, 2016 by tdr170 (see edit history) Link to comment Share on other sites More sharing options...
selectshop.at Posted September 23, 2016 Share Posted September 23, 2016 PS: I've deleted/reworked your posts before, cause you are revealing some crucial data by adding that links.... You can try to uninstall, or restart the module from back-office, but in this case I prefere to remove it ad infinitum, for to add it as new module to ftp again.... Something is going wrong with the scripts you are having for this module, cause hook id 0 is not available, and this is coming from the script of the module.... Delete the module from ftp (or BO), or change the active 1 to 0 on database for it as told before. Link to comment Share on other sites More sharing options...
jpcmorais Posted September 23, 2016 Author Share Posted September 23, 2016 Now the error is: Duplicate entry '76-0-1' for key 'PRIMARY' 76 its the module dashactivity What now? Delete it? Link to comment Share on other sites More sharing options...
tdr170 Posted September 23, 2016 Share Posted September 23, 2016 Uninstall from BO delete and go on to next keep doing this untill the theme loads Link to comment Share on other sites More sharing options...
selectshop.at Posted September 23, 2016 Share Posted September 23, 2016 Did you tried to upgrade the shop several times ? module dashactivity is not really a module, but a core feature.... Yes you can deinstall it as well, BUT: If I were you, I will backup all you have now and try to rollback your Prestahop to the old version, which was working before. If this done, I will try a new upgrade by: Before: deinstall all non-native modules and switch to default theme. Disable cache module (APC,xCache, memcache, or what else you are using) And only after this make an upgrade to latest version. Link to comment Share on other sites More sharing options...
tdr170 Posted September 23, 2016 Share Posted September 23, 2016 Probably good advice did you backup of your shop and database before the upgrade if so you could keep going and see what happens then if all else fails do a rollback if that fails you can use the backup to restore your shop back to 1.5. Always backup everything before upgrading I am sure I do not need to say why at this point. Link to comment Share on other sites More sharing options...
jpcmorais Posted September 23, 2016 Author Share Posted September 23, 2016 Thanks. That did it. You are a life saver. Front office is working. When I try to access BO I get this: Warning: mcrypt_decrypt() [function.mcrypt-decrypt]: The IV parameter must be as long as the blocksize in .../classes/Rijndael.php on line 68Warning: Cannot modify header information - headers already sent by (output started at .../classes/Rijndael.php:68) in .../classes/Cookie.php on line 343 Can you help me on that? Link to comment Share on other sites More sharing options...
selectshop.at Posted September 23, 2016 Share Posted September 23, 2016 Which encryption are you using ? Please check on tab: parametros avancados -> desempenho -> bloco "criptografando". Link to comment Share on other sites More sharing options...
jpcmorais Posted September 23, 2016 Author Share Posted September 23, 2016 I sorted this out. I cleared the browser's cache and it worked. I'm marking this has solved. Thanks a lot. 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