Jump to content

"Upgrade Module" Update crashed B.O


Recommended Posts

So I just updated the "Upgrade" module and the B.O has now crashed.

The error showing is 

Attempted to load class "DisplayBackOfficeHeader" from namespace "PrestaShop\Module\AutoUpgrade\Hooks".
Did you forget a "use" statement for e.g. "PrestaShop\Module\PsAccounts\Hook\DisplayBackOfficeHeader" or "PrestaShop\Module\AutoUpgrade\Hooks\DisplayBackOfficeHeader"?

I have renamed the var so that it is recreated but still showing the above error and cannot access B.O

Link to comment
Share on other sites

Debug is highlighting this line

return (new \PrestaShop\Module\AutoUpgrade\Hooks\DisplayBackOfficeHeader($this->getUpgradeContainer()))->renderUpdateNotification();

 

Link to comment
Share on other sites

Whilst not ideal, I have removed this bit of code from autoupgrade.php and I have the back office

public function hookDisplayBackOfficeHeader()
    {
        if (!$this->initAutoloaderIfCompliant()) {
            return '';
        }

        return (new \PrestaShop\Module\AutoUpgrade\Hooks\DisplayBackOfficeHeader($this->getUpgradeContainer()))->renderUpdateNotification();
    }

I removed that because it doesnt exist in the previous version of autoupgrade.php

Link to comment
Share on other sites

Posted (edited)

Ok so I reset the module, and put the removed code back, hooked it to the 2 positions available and got it to eventually run.

Tried updating the test site and after copying the files and upgrading the database I get the following error.

CRITICAL - ErrorHandler - /home/********/public_html/var/cache/prod/FrontContainer.php line 2216 - Symfony\Component\DependencyInjection\Exception\InvalidArgumentException: The parameter "prestashop.installed_modules" must be defined.

then loading the B.O I get

An exception has been thrown during the rendering of a template ("An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.type' in 'SELECT'").

and the F.O shows this

[PrestaShopException]

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'theme_name' in 'WHERE'
at line 151 in file classes/db/DbPDO.php

146.     protected function _query($sql)
147.     {
148.         try {
149.             return $this->link->query($sql);
150.         } catch (PDOException $exception) {
151.             throw new PrestaShopException($exception->getMessage(), (int) $exception->getCode(), $exception);
152.         }
153.     }
154. 
155.     /**
156.      * Returns the next row from the result set.

I tried the update twice. 

I had the "Disable overrides" checked and tried with and withouth "disable non native modules" checked.

 

Edited by Ray UK (see edit history)
Link to comment
Share on other sites

6 hours ago, Ray UK said:

So I just updated the "Upgrade" module and the B.O has now crashed.

You wish to update from version xx.xx to 8.21? 
Why in 1st place? 

Link to comment
Share on other sites

Just now, Ray UK said:

Why have the Prestashop team bothered spending lots of time creating a new version of Prestashop.

Not to make your issues disappear if that is what you are hoping for.


The switch from a free php towards frameworks has created a lot of issues.
The spread between servers, shared servers, VPS and dedicated servers created a few more issues.
In theory a shop owner concentrates on selling and has an IT staff around to make a new version where everything works.

In reality it is one person who haggles and tries to keep afloat. It all works peachy till issues arrive. So excess funds were not laid aside, for just in case but spent in bits and pieces.....  

Presta uses new version as test for production shines often thru. Unfortunatly that does not help you.  

https://stackoverflow.com/questions/78087873/why-getting-sqlstate42s22-error-on-deploy

one solution for a user was to adjust the mariaDB version. 

On Github another solution was given: https://github.com/symfony/symfony/discussions/59143

  • Like 1
Link to comment
Share on other sites

It seems to be full of bugs lol.

Ive just tried a fresh install on php 8.1, 8.2 & 8.4 and each time the install breaks here.

image.png.74c10996d5ce8bfa664ca8ec9f0e1574.png

The funny thing is, I had the alpha version of P9 installed already but the autoupgrade didnt see that as a new version so I deleted it to try install the public release.

Link to comment
Share on other sites

19 minutes ago, Ray UK said:

Ive just tried a fresh install on php 8.1, 8.2 & 8.4 and each time the install breaks here.

I like better TB (Thirtybees) and there is a script available to import products from Presta to TB. 

The server has a big influence about the shops, I've had cases where a redoing was not necessary, just a server-move cleared the issue. 
Later we wiser, some server block even php classes.  

Link to comment
Share on other sites

I was going to install 9 and try prestatools to import the data.  9 alpha installed fine but 9 public wont install lol.  

Ive only used this one VPS and its been fine with all the versions so far.

Link to comment
Share on other sites

Thought I'd test this thing on a dev domain just for the heck of it. 500 at update assistant 7, no other info. Putting this on the back burner for a few more months (6 at least I'd guess), then will try again.

Link to comment
Share on other sites

45 minutes ago, jetx said:

Thought I'd test this thing on a dev domain just for the heck of it. 500 at update assistant 7, no other info. Putting this on the back burner for a few more months (6 at least I'd guess), then will try again.

Note: A slow morning so I just ran this update assistant thing on a fresh installation of 8.2.1 with data migrated from a production domain and it worked without any issues. Dedicated server, php 8.1.

  • Like 1
Link to comment
Share on other sites

Posted (edited)
8 hours ago, jetx said:

Note: A slow morning so I just ran this update assistant thing on a fresh installation of 8.2.1 with data migrated from a production domain and it worked without any issues. Dedicated server, php 8.1.

Ive also done that and that was the only was I could get it installed.

I have just seen though that if the Region is set to UK during the install, it will fail.   Its a major reported bug that should be rectified in the next update

Edited by Ray UK (see edit history)
Link to comment
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
×
×
  • Create New...