prestarocket-agence / classic-rocket

Classic Rocket is a rework of "classic theme". It has been built keeping in mind : performance, accessibility and SEO.
https://demoprestashop.prestarocket.com/
Other
229 stars 127 forks source link

Unable to switch template for a single store in a multistore setup #181

Closed lmeyer1 closed 3 years ago

lmeyer1 commented 4 years ago

I'm not sure that tis is a bug with classic-rocket theme ore with core Prestashop. I nevertheless post this issue here. Crossposted from https://www.prestashop.com/forums/topic/1029665-unable-to-switch-template-for-a-single-store-in-a-multistore-setup/

I have a clean installation of 1.7.6.7. I added the classic-rocket theme under Appearance - Theme - Add a theme. I have multistore enabled, and just two basic stores.

When I go into single store context, and then switch the theme only for this store, I get a Error 500, and afterwards, the FO of the two shops doesn't display correctly due to wrong/mixed CSS getting loaded.

The details of the error are here:

[Thu Aug 13 14:14:39.423113 2020] [***] AH01071: Got error '
PHP message: PHP Fatal error:  Uncaught Error: Class 'Tools' not found in /home/www-data/ps1767.sbgmb.net/classes/db/Db.php:794
Stack trace:
#0 /home/www-data/ps1767.sbgmb.net/config/alias.php(47): DbCore->escape('configuration', false)
#1 /home/www-data/ps1767.sbgmb.net/config/alias.php(52): pSQL('configuration')
#2 /home/www-data/ps1767.sbgmb.net/classes/Configuration.php(155): bqSQL('configuration')
#3 /home/www-data/ps1767.sbgmb.net/classes/Configuration.php(209): ConfigurationCore::loadConfiguration()
#4 /home/www-data/ps1767.sbgmb.net/classes/PrestaShopAutoload.php(171): ConfigurationCore::get('PS_DISABLE_OVER...')
#5 /home/www-data/ps1767.sbgmb.net/classes/PrestaShopAutoload.php(130): PrestaShopAutoload->generateIndex()
#6 [internal function]: PrestaShopAutoload->load('Tools')
#7 /home/www-data/ps1767.sbgmb.net/config/config.inc.php(85): spl_autoload_call('Tools')
#8 /home/www-data/ps1767.sbgmb.net/admin491uyu33e/index.php(40): require('/home/www-data/...')
#9 {main}
  thrown in /home/www-d...', referer: https://ps1767.sbgmb.net/admin491uyu33e/index.php/improve/design/themes/?_token=***

This seems like mysterious: how can the class Tools be missing ? The file is there ins classes\Tools.php. I also deleted var\cache\prod\class_index.php, but this does not help either.

matks commented 4 years ago

This seems like mysterious: how can the class Tools be missing ? The file is there ins classes\Tools.php. I also deleted var\cache\prod\class_index.php, but this does not help either.

The file being there is not enough. By Uncaught Error: Class 'Tools' what PHP is telling you is rather "I was not able to load this class" so the issue seems to come from autoload.

lmeyer1 commented 4 years ago

I made a second installation, the error does not reproduce now, but the garbled design in the FO does.

Bug The two themes classic and classic-rocket cannot be used simultaneously in two different stores of a multistore environment.

How to reproduce

Screenshots This is what displays garbled means for me: Capture