PrestaShop / PrestaShop

PrestaShop is the universal open-source software platform to build your e-commerce solution.
https://www.prestashop-project.org/
Other
8.08k stars 4.79k forks source link

DataLayerException: Unable to persist data in cache data layer #17770

Closed caos30 closed 4 years ago

caos30 commented 4 years ago

Description the bug After change some settings at Admin panel, AGAIN (in the same week see this other issue) appears on browser the same error:

Fatal error: Uncaught PrestaShop\PrestaShop\Core\Data\Layer\DataLayerException: Unable to persist data in cache data layer in /home/prestan/sinsanoroeste.com/src/Core/Localization/CLDR/DataLayer/LocaleCache.php:124

Stack trace:
#0 /home/prestan/sinsanoroeste.com/src/Core/Data/Layer/AbstractDataLayer.php(197): PrestaShop\PrestaShop\Core\Localization\CLDR\DataLayer\LocaleCache->doWrite('es-MX', Object(PrestaShop\PrestaShop\Core\Localization\CLDR\LocaleData))
#1 /home/prestan/sinsanoroeste.com/src/Core/Data/Layer/AbstractDataLayer.php(102): PrestaShop\PrestaShop\Core\Data\Layer\AbstractDataLayer->saveReadPropagationResult('es-MX', Object(PrestaShop\PrestaShop\Core\Localization\CLDR\LocaleData))
#2 /home/prestan/sinsanoroeste.com/src/Core/Localization/CLDR/LocaleDataSource.php(62): PrestaShop\PrestaShop\Core\Data\Layer\AbstractDataLayer->read('es-MX')
#3 /home/prestan/sinsanoroeste.com/src/Core/Localization/CLDR/LocaleRepository.php(60): PrestaShop\PrestaShop\Core\Localization\CLDR\LocaleDataSource->getLocaleData('es-MX')
#4 in **/home/prestan/sinsanoroeste.com/src/Core/Data/Layer/AbstractDataLayer.php** on line **202**

This error appears on the frontend, in any section i try to visit. In the Admin panel now appears always a 500 error:

**Oops! An Error Occurred
The server returned a "500 Internal Server Error".**
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused. 

The most strange thing is that the error on browser is the same than the one reported on my yesterday issue, but now it has not relation (i think, with hooks!). In the next section of this comment i relate my steps.

To Reproduce Steps to reproduce the behavior:

  1. On Admin panel (Advanced > Performance) i cleaned cache
  2. On that section (Advanced > Performance) i change some settings, sincerely i am not 100% sure about the settings i changed. I think that i changed these 3 on "Debug mode" section:
    • Disable non PrestaShop modules -> YES
    • Disable all overrides -> YES
    • Debug mode -> YES But, sincerely... i think that tested several combinations of YES/NO previously to "the crash".
  3. After "save changes" on one of those combinations the Admin and Frontend crashed with the errors explained above of this comment.

Additional information PrestaShop version: 1.7.6.3 PHP version: 7.2

More additional information Sincerely: i was trying to solve another problem in my Prestashop (i installed it a few days ago) very annoying, which it deserves it own ISSUE ticket! But i hoped to solve by myself. I think that it could be useful and maybe has relation with both issues:

So, trying to solve this "no-matches mystery" i proceeded with those changes on cache settings.

Finally additional information

I suspect that i did something "strange" or maybe "bad" when i installed this e-shop. I must say that it's my FIRST prestashop installation. Well, you know, is quite good the installation wizard, but, after all is my first prestashop site.

Furthermore, maybe one thing that could have relation with my problems on this website is the installation of this third module CyberOffice/MyCyberOffice for connect via webservice Prestashop with Dolibarr ERP/CRM (another opensource software), so synchronize products, stock, cusotomers and orders, etc...

I means, trying to connect Prestashop with Dolibarr i've done a lot of changes on settgins of Prestashop, webservices, etc... And maybe this module is interfering in some way. So, i think that it's imortant to mention it for you be able to help.

https://www.dolistore.com/es/modulos/751-Dolibarr---Prestashop-Synchronization-Connector--CyberOffice-plugin-.html?search_query=prestashop&results=7

Anyway, i continue finding curious that always the reported error has relation with cache... Must we suspect that in PrestaShop there is some kind of "not well treated" exceptions regarding cache?

Meanwhile Meanwhile, i will install a fresh Prestashop in another subdomain hosted in the same server. To see if -for example- there is no problem with PRODUCT SEARCH or cache... before to install the module of syncrhonization with Dolibarr. I will report here the results.

Many many thanks in advance!

khouloudbelguith commented 4 years ago

Hi @caos30,

Thanks for your report.

The most strange thing is that the error on browser is the same than the one reported on my yesterday issue, but now it has not relation (i think, with hooks!). In the next section of this comment, i relate my steps.

So, when the debug mode enabled, in the FO => you have this exception? image

Disable non PrestaShop modules -> YES Disable all overrides -> YES

those two options don't work in Prestashop as reported here:

I means, trying to connect Prestashop with Dolibarr i've done a lot of changes on settgins of Prestashop, webservices, etc... And maybe this module is interfering in some way. So, i think that it's imortant to mention it for you be able to help.

As it's not a module provided by Prestashop, we can't do anything with this. You should contact the module author via your addons.prestashop.com account, they are the only ones to help you with it.

Thanks!

khouloudbelguith commented 4 years ago

Hi @caos30,

Since we had no news from you for more than 30 days, I'll close this ticket. Feel free to open another one if you can give specific details.

Thanks!

shawe commented 4 years ago

@caos30 I bypassed problems like this removing all inside var/cache

aitorserra commented 1 year ago

Removing all inside var/cache worked for me too, thanks.

sparadeloweb commented 1 year ago

@caos30 I bypassed problems like this removing all inside var/cache

This solutions keeps working :)

Thanks mate <3

Deparagon commented 1 year ago

Deleting /var/cache folder solved the issue. Thanks for the update

axbh commented 6 months ago

Deleting the cache helped solve the problem in p8. Thnx