Jump to content

Error after update and restore backup


Recommended Posts

Hi!
Trying to update prestashop I had error 500 only in backend. Frontend seems to work.
I restored my previous server backup but error still exist.


DEBUG:
 

(1/3) ParseException
The constant "\PrestaShop\PrestaShop\Adapter\News\NewsDataProvider::CLOSED_ALLOWED_FAILURES" is not defined at line 10 (near "- !php/const \PrestaShop\PrestaShop\Adapter\News\NewsDataProvider::CLOSED_ALLOWED_FAILURES").


(2/3) InvalidArgumentException
The file "/(...)/public_html/src/PrestaShopBundle/Resources/config/services/adapter/news.yml" does not contain valid YAML: The constant "\PrestaShop\PrestaShop\Adapter\News\NewsDataProvider::CLOSED_ALLOWED_FAILURES" is not defined at line 10 (near "- !php/const \PrestaShop\PrestaShop\Adapter\News\NewsDataProvider::CLOSED_ALLOWED_FAILURES").


(3/3) FileLoaderLoadException
The file "/(...)/public_html/src/PrestaShopBundle/Resources/config/services/adapter/news.yml" does not contain valid YAML: The constant "\PrestaShop\PrestaShop\Adapter\News\NewsDataProvider::CLOSED_ALLOWED_FAILURES" is not defined at line 10 (near "- !php/const \PrestaShop\PrestaShop\Adapter\News\NewsDataProvider::CLOSED_ALLOWED_FAILURES") in /(...)/public_html/src/PrestaShopBundle/Resources/config/services/adapter/news.yml (which is being imported from "/(...)/public_html/src/PrestaShopBundle/Resources/config/services.yml").


Some help?

Thanks a lot!

Share this post


Link to post
Share on other sites

Hy to all,

I also have the same problem, after restoring a backup the error persisted. So I deleted the files present in the public_html of my site and restored the backup and everything is back to normal. The restore problem is due to the fact that the new files are not deleted but only the files present in the backup are restored. I hope I have been of help. Tomorrow I will try to update to 1.7.7.0 again

  • Thanks 2

Share this post


Link to post
Share on other sites

On 12/7/2020 at 3:31 AM, anubi80 said:

Hy to all,

I also have the same problem, after restoring a backup the error persisted. So I deleted the files present in the public_html of my site and restored the backup and everything is back to normal. The restore problem is due to the fact that the new files are not deleted but only the files present in the backup are restored. I hope I have been of help. Tomorrow I will try to update to 1.7.7.0 again

Hi!
Thanks for your solution.
Did you do the update yet?

Share this post


Link to post
Share on other sites

I experienced exact same problem after upgrading to 1.7.7.0 (the upgrade failed at the db upgrade - I do not know why) - I made a restore , tried the update the one click upgrade module and the backend went blank - why does this error happen ??

Share this post


Link to post
Share on other sites

I have successfully upgraded. The problem in my opinion was only due to the cache. I did a test on a test environment first. In this environment I copied database and site files, changed the addresses to test it on a different domain. i disabled memcached caches and the upgrade finished successfully. On the production environment I did this: 

first a backup of everything 

then I put it in maintenance, 

deactivated memcached cache from prestashop control panel 

then on my provider's panel I cleaned and deactivated the direct nginx cache and cleaned the cloudflare cache 

i upgraded and no longer had the disappearing menu issue

Now i’m in 1.7.7.0.

ciao Matteo 

P.S. I also had two errors on the database but they are not the ones that generate the problem, they are errors on two tables that do not exist (session tables).

Edited by anubi80 (see edit history)

Share this post


Link to post
Share on other sites

On 12/14/2020 at 12:20 AM, anubi80 said:

I have successfully upgraded. The problem in my opinion was only due to the cache. I did a test on a test environment first. In this environment I copied database and site files, changed the addresses to test it on a different domain. i disabled memcached caches and the upgrade finished successfully. On the production environment I did this: 

first a backup of everything 

then I put it in maintenance, 

deactivated memcached cache from prestashop control panel 

then on my provider's panel I cleaned and deactivated the direct nginx cache and cleaned the cloudflare cache 

i upgraded and no longer had the disappearing menu issue

Now i’m in 1.7.7.0.

ciao Matteo 

P.S. I also had two errors on the database but they are not the ones that generate the problem, they are errors on two tables that do not exist (session tables).

but the problem here has to do with prestashop backoffice, how to access the control panel since the Backoffice is blank?

Share this post


Link to post
Share on other sites

My problem was on DB.  In this upgrade Prestashop try to convert DB fields from utf-8 to utf8mb4.
In one field this conversion failed.
I did manual conversion on DB from phpMyAdmin (to convert that field I allow Null value) and then successfully repeat Prestashop upgrade.

  • Like 1

Share this post


Link to post
Share on other sites

On 12/17/2020 at 5:08 PM, ABABA said:

but the problem here has to do with prestashop backoffice, how to access the control panel since the Backoffice is blank?

Hi ABABA,

you need to clean all cache before upgrade the prestashop version, if you do that there is no problem to upgrade the version.

Matteo

Share this post


Link to post
Share on other sites

6 hours ago, MarcoGiuliani said:

My problem was on DB.  In this upgrade Prestashop try to convert DB fields from utf-8 to utf8mb4.
In one field this conversion failed.
I did manual conversion on DB from phpMyAdmin (to convert that field I allow Null value) and then successfully repeat Prestashop upgrade.

Good job Marco

;)

Matteo

Share this post


Link to post
Share on other sites

  • 1 month later...
On 12/12/2020 at 10:13 PM, rbuelund said:

I experienced exact same problem after upgrading to 1.7.7.0 (the upgrade failed at the db upgrade - I do not know why) - I made a restore , tried the update the one click upgrade module and the backend went blank - why does this error happen ??

I have exactly the same problem. Even if I restore a backup the problem continues. Could you solve the problem at the end? Thanks

Share this post


Link to post
Share on other sites

On 12/18/2020 at 12:26 PM, MarcoGiuliani said:

My problem was on DB.  In this upgrade Prestashop try to convert DB fields from utf-8 to utf8mb4.
In one field this conversion failed.
I did manual conversion on DB from phpMyAdmin (to convert that field I allow Null value) and then successfully repeat Prestashop upgrade.

Before update go to phpMyAdmin and try to convert DB to utf8mb4.
If some field fails the conversion try to allow Null value on that field and try to convert this field again.

Then delete all Prestashop files from FTP before restore your backup.
When DB use utf8mb4 Prestashop upgrade should go right.

Share this post


Link to post
Share on other sites

Hello, i still get the (3/3) FileLoaderLoadException, after restoring the backup.
The front end works fine. But i cannot access to the admin panel.
How can i add a new admin using cPanel?

Thank you

Share this post


Link to post
Share on other sites

2 hours ago, MarcoGiuliani said:

Before update go to phpMyAdmin and try to convert DB to utf8mb4.
If some field fails the conversion try to allow Null value on that field and try to convert this field again.

Then delete all Prestashop files from FTP before restore your backup.
When DB use utf8mb4 Prestashop upgrade should go right.

Thanks Marco my database is already in utf8mb4. I think that is something wrong related with symfony configuration but I am not sure

What I don't understand is why the problem is not solved when restoring files and databases

Share this post


Link to post
Share on other sites

21 minutes ago, dpo said:

Thanks Marco my database is already in utf8mb4. I think that is something wrong related with symfony configuration but I am not sure

What I don't understand is why the problem is not solved when restoring files and databases

Have you delete all files in prestashop folder from ftp before restore backup?
Because the restore don't delete them (only rewrite).
If the problem is in an old file or a file not in the backup the restore don't delete it.

Share this post


Link to post
Share on other sites

4 hours ago, MarcoGiuliani said:

Have you delete all files in prestashop folder from ftp before restore backup?
Because the restore don't delete them (only rewrite).
If the problem is in an old file or a file not in the backup the restore don't delete it.

Yes, I deleted all the files and all the tables in the database. I tried to restore in different days and get the same problem.

Really strange

Share this post


Link to post
Share on other sites

Honestly I have to say I'm shocked when I read all these posts about crashed systems after an upgrade! Especially as there seem no clear reasons and no easy solutions. On top to read that even a clean restore did not get the system back working causes a cold shiver on my back. I'm on 1.7.6.5 and tried before (as it came up) to update the One-Click-Update module. Now I have a white admin page... I'm not using cache, the errors are identical to what we read above (CLOSED_ALLOWED_FAILURES). This is very frustrating and I don't want to try to restore a backup (if it  even won't solve the problem) since I'm loosing data from sales done in the meantime!

I tried also days ago to upgrade to 1.7.7.1 - which obviously failed as well (DB update failed...) - lucky I made before a manual "copy" of data and DB, which I restored and it got the system back running. Altogether I'm under the impression that PrestaShop has so many "side effects" that small problems lead to a collapse. When running the debug mode I saw many other errors popping up and the front end actually wouldn't load at all... This shows clearly that this system is from the bottom up buggy.

For me it comes to the point that I have to take some money and move on. I spend quite a bit on modules and much more of my time - unfortunately wasted now.

 

Share this post


Link to post
Share on other sites

On 2/12/2021 at 8:31 AM, dpo said:

Yes, I deleted all the files and all the tables in the database. I tried to restore in different days and get the same problem.

Really strange

try to delete all folders under \var\cache...

They will be recreated automatically. I found a weird side effect when I edited a core file, which led to white screen, then I restored the original file but the white screen wouldn't go away. After deleting this cache folder it started to work again.

Edited by AndyNZ
typo (see edit history)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More