Prestashop: Attempted to load class "CacheStorage" from namespace "GuzzleHttp\Subscriber\Cache". Did you forget a "use" statement for another namespace?

Created on 30 Sep 2019  路  13Comments  路  Source: PrestaShop/PrestaShop

Bonjour, je rencontre un probl茅me apres un clone de mon projet prestashop, le front office est bien disponible par contre le backoffice apres connexion m'affiche ce message d'erreur.

Hello, I have a problem after a clone of my prestashop project, the front office is available but the backoffice after login displays this error message.

GitHub Logo

avez vous une id茅e ?
Do you have idea?

BO Bug No change required develop psaddonsconnect

Most helpful comment

Deleting var/cache (prod & dev) before login into the dashboard doesn't solve this problem.

Reinstall the module fixed the problem but I do this way

1) I disable the module first by renaming the module at the hosting
2) Then after i'm able to login into the dashboard, I have to open the module manager section and leave the URL open
3) Then I rename back the module to the original name from 1)
4) I refresh the module manager section and search on the psaddonsconnect and delete that module
5) Then I search psaddonsconnect and reinstall
6) Now I'm able to login like normal.

All 13 comments

Hi @benoitpetit,

I did not manage to reproduce the issue with the develop branch.
I followed these steps:

  1. git clone https://github.com/PrestaShop/PrestaShop.git
  2. cd PrestaShop
  3. composer install
  4. chmod 777 -R /path_to_folder/
  5. Install
    => Check FO & BO => OK

tHANKS!

@khouloudbelguith OK I managed to reproduce this issue as the OP mentioned.

1) I made full backup of the website including database.
2) Then, I delete all the existing prestashop files including database.
3) Restore/import files and database from backup that I made on 1)
4) I make sure that all permission is correct so all PS files are chmod with 644 while directories with 755
5) Login into prestashop Backoffice
6) The dashboard error occur same what OP mention

Seems like related to how the timestamp is handled between the data from backup and the ps server when navigating to dashboard (my guess but I'm not sure.)

The error only occur while navigating to dashboard, the other section is OK. But the only temporarily workaround is that I need to rename psaddonsconnect folder at public_html/modules/psaddonsconnect to psaddonsconnect_backup. Then you can access again the dashboard.

@benoitpetit, after restoring your back up & before login into PrestaShop, could you please try to clear cache manually by deleting all the folder into var/cache (prod & dev).
If you try to re-install the module psaddonsconnect, it is OK?
Thanks to check and feedback.

Deleting var/cache (prod & dev) before login into the dashboard doesn't solve this problem.

Reinstall the module fixed the problem but I do this way

1) I disable the module first by renaming the module at the hosting
2) Then after i'm able to login into the dashboard, I have to open the module manager section and leave the URL open
3) Then I rename back the module to the original name from 1)
4) I refresh the module manager section and search on the psaddonsconnect and delete that module
5) Then I search psaddonsconnect and reinstall
6) Now I'm able to login like normal.

@benoitpetit, in my case, it is ok after a fresh install or following these steps: https://github.com/PrestaShop/PrestaShop/issues/15744#issuecomment-536901041
You can move your Project to a new domain without errors following these steps:

  1. Made a backup for my files & the database
  2. Upload your store's files to your new server
  3. Import the old store's database to the new server
  4. In file /app/config/parameters.php, configure your PrestaShop site.
    4.1. DB_SERVER: database's server;
    4.2. DB_NAME: Name of the database from step 5;
    4.3. DB_USER: User associated with the database;
    4.4. DB_PASSWD: The user's password;
  5. in Table ps_shop_url, change with the
    5.1. domain => new domain
    5.2. domain_ssl => new domain_ssl
    5.3. physical_uri => new physical_uri
  6. Clear the cache manually by deleting all the folder into var/cache (prod & dev) => could solve your issue

Since it is fixed, I close the issue, feel free to open a new one when needed.

Thanks!

Deleting var/cache (prod & dev) before login into the dashboard doesn't solve this problem.

Reinstall the module fixed the problem but I do this way

  1. I disable the module first by renaming the module at the hosting
  2. Then after i'm able to login into the dashboard, I have to open the module manager section and leave the URL open
  3. Then I rename back the module to the original name from 1)
  4. I refresh the module manager section and search on the psaddonsconnect and delete that module
  5. Then I search psaddonsconnect and reinstall
  6. Now I'm able to login like normal.

Thank you.
Moving the psaddonsconnect folder from the modules dir to /tmp allowed me to login again.

I could not find a way to reinstall the module via the web interface, how do you do it?

I copied the files from the source installation (this was a migration) again and the problem was solved for me.

@benoitpetit, thanks to try with this zip folder
psaddonsconnect.zip

Thanks!

Thanks for everyone's comments.

I fixed it by navigating to admin/index.php?controller=AdminModules
(I had to "accept the risk" of an invalid token, but at least I can access back office)

Then uninstall the module psaddonsconnect

Now it works like a charm 馃憣

I can back up and restore the old fashioned way however many times i want.

IMO this is a glitch with the module psaddonsconnect that should be fixed.

This problem i still unresolved. My case was copying full site to another location on this same domain.

It seems to be a cache issue, can you delete all content in /var/cache ?
This module need an additional check in this case

It does not help to delete the var/cache.
Reinstalling the module does not help as well, i am only able to access BO while the module is disabled.

you have some solutions:

If you choose any of these options, it does not affect the store, unless you link your store with your prestashop account, almost nobody does, so with these options it is solved that simple.

  1. Delete the psaddonsconnect module folder on: nameeEcommerce/modules/psaddonsconnect
  2. Rename the psaddonsconnect module folder on: nameeEcommerce/modules/psaddonsconnect -> psaddonsconnect_copy

If you are developer, you can make this. first , you need to install composer

  1. Include package version and get files with composer
    3.1. go to module: nameeEcommerce/modules/psaddonsconnect
    3.2. open file: composer.json
    3.3. in line 16 you can see:
    "require": {
    ...
    "guzzlehttp/cache-subscriber": "dev-master"
    ...
    }
 change this line, insert
`guzzlehttp/cache-subscriber": "0.2.*@dev`

 Or execute ..

$ composer require guzzlehttp/cache-subscriber

  1. Download again this modulo and replace in your project, link is here:

Download Module From Prestashop

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zuk3975 picture zuk3975  路  3Comments

khouloudbelguith picture khouloudbelguith  路  3Comments

matks picture matks  路  3Comments

marionf picture marionf  路  3Comments

vincent-dp picture vincent-dp  路  3Comments