Joey Posted March 7, 2023 Share Posted March 7, 2023 Hi Everyone, We upgraded our shop fine from PS 1.7.8.8 to PS 8.01. Everything works great with PHP 7.4. When we switch to PHP 8.0 or 8.1 we're seeing some issues. The first issue we saw was that some uninstalled but not deleted older modules were causing PHP fatal errors with the backoffice found in the psadmin error log. Once we deleted those old folders we were able to access the back office again. The new issue we're seeing seems like a core PS issue. When switching to PHP 8+ and trying to adjust the quantity on the product page we're getting this: [07-Mar-2023 14:35:37 Canada/Atlantic] PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, PrestaShop\PrestaShop\Adapter\Presenter\Product\ProductLazyArray given in /home2/canadac3/public_html/controllers/front/ProductController.php:517 Stack trace: #0 /home2/canadac3/public_html/override/controllers/front/ProductController.php(247): ProductControllerCore->getMinimalProductOrDeclinationQuantity(Object(PrestaShop\PrestaShop\Adapter\Presenter\Product\ProductLazyArray)) #1 /home2/canadac3/public_html/classes/controller/Controller.php(334): ProductController->displayAjaxRefresh() #2 /home2/canadac3/public_html/classes/Dispatcher.php(510): ControllerCore->run() #3 /home2/canadac3/public_html/override/classes/Dispatcher.php(1541): DispatcherCore->dispatch() #4 /home2/canadac3/public_html/index.php(28): Dispatcher->dispatch() #5 {main} Does anyone have any ideas about this one? The issue disappears when we switch back to PHP 7.4. Link to comment Share on other sites More sharing options...
endriu107 Posted March 7, 2023 Share Posted March 7, 2023 You have some overrided files that have issue like: override/controllers/front/ProductController.php override/classes/Dispatcher.php Link to comment Share on other sites More sharing options...
Joey Posted March 7, 2023 Author Share Posted March 7, 2023 Can we tell what modules have created overrides? Link to comment Share on other sites More sharing options...
endriu107 Posted March 7, 2023 Share Posted March 7, 2023 Check this file there probably will be comments with module name. Link to comment Share on other sites More sharing options...
Joey Posted March 7, 2023 Author Share Posted March 7, 2023 And if there's not? Do we send the error to every one of our module developers to see who it is? Link to comment Share on other sites More sharing options...
endriu107 Posted March 7, 2023 Share Posted March 7, 2023 You can do that or just check in modules catalogs what module have it. Link to comment Share on other sites More sharing options...
idnovate.com Posted March 8, 2023 Share Posted March 8, 2023 When a module has an override, PrestaShop adds a comment automatically on the installation. If there isn't it means that this override is not from a module or that this override has been done manually due to an override conflict. Link to comment Share on other sites More sharing options...
Joey Posted March 8, 2023 Author Share Posted March 8, 2023 Thanks guys, it was due to a poorly coded module I deactivated. 1 Link to comment Share on other sites More sharing options...
pikasso72 Posted April 24, 2023 Share Posted April 24, 2023 (edited) Hi, I´ve the same problem when I adjust quantity for the cart, adds the products to the cart but remains thinking, you have to refresh the browser for the page to return. ------------------------------------------------------------------------------------------------------------------------ [24-Apr-2023 19:33:29] WARNING: [pool mydomain.eu] child 2418136 said into stderr: "PHP message: PHP Warning: Undefined array key 0 in /var/www/vhosts/mydomain.eu/httpdocs/override/classes/Link.php on line 118" [24-Apr-2023 19:33:29] WARNING: [pool mydomain.eu] child 2418136 said into stderr: "PHP message: PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, PrestaShop\PrestaShop\Adapter\Presenter\Product\ProductLazyArray given in /var/www/vhosts/mydomain.eu/httpdocs/controllers/front/ProductController.php:517" [24-Apr-2023 19:33:29] WARNING: [pool mydomain.eu] child 2418136 said into stderr: "Stack trace:" [24-Apr-2023 19:33:29] WARNING: [pool mydomain.eu] child 2418136 said into stderr: "#0 /var/www/vhosts/mydomain.eu/httpdocs/override/controllers/front/ProductController.php(247): ProductControllerCore->getMinimalProductOrDeclinationQuantity()" [24-Apr-2023 19:33:29] WARNING: [pool mydomain.eu] child 2418136 said into stderr: "#1 /var/www/vhosts/mydomain.eu/httpdocs/classes/controller/Controller.php(334): ProductController->displayAjaxRefresh()" [24-Apr-2023 19:33:29] WARNING: [pool mydomain.eu] child 2418136 said into stderr: "#2 /var/www/vhosts/mydomain.eu/httpdocs/classes/Dispatcher.php(510): ControllerCore->run()" [24-Apr-2023 19:33:29] WARNING: [pool mydomain.eu] child 2418136 said into stderr: "#3 /var/www/vhosts/mydomain.eu/httpdocs/index.php(28): DispatcherCore->dispatch()" [24-Apr-2023 19:33:29] WARNING: [pool mydomain.eu] child 2418136 said into stderr: "#4 {main}" [24-Apr-2023 19:33:29] WARNING: [pool mydomain.eu] child 2418136 said into stderr: " thrown in /var/www/vhosts/mydomain.eu/httpdocs/controllers/front/ProductController.php on line 517" ------------------------------------------------------------------------------------------------------------------------------ This is my configuration: PS 8.03 PHP 8.0.28 Template Wharehouse 4.6.1 there is a message that appears to me from "UNDEFINED" I have disabled all non-native modules, I have even tried with the classic theme and it gives me the same error Some help ?? Edited April 24, 2023 by pikasso72 (see edit history) Link to comment Share on other sites More sharing options...
pikasso72 Posted April 26, 2023 Share Posted April 26, 2023 I have found the problem and it is a bug of the Wharehouse theme, attached image. This option should be set to "NO" if you are not using attributes or combinations. The problem is that if the product does not have attributes, after adding to the cart it is left wondering if the option "Combination loading" is activated in the Wharehouse configuration Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now