bmcarvalho Posted March 13, 2023 Share Posted March 13, 2023 Good morning Prestashop stopped working today cannot access some of the orders prestasho 1.7.8.8 PHP : 7.4.33 when in debug mode also have a second warning when log in (in the end) .................................................. in src/Core/Domain/Order/QueryResult/OrderStatusForViewing.php (line 83) * @param DateTimeImmutable $createdAt * @param bool $withEmail * @param string|null $employeeFirstName * @param string|null $employeeLastName */ public function __construct( int $orderHistoryId, int $orderStatusId, string $name, string $color, DateTimeImmutable $createdAt, ........................................................................................................ INFO09:57:36requestMatched route "admin_orders_view". DEBUG09:57:36securityRead existing security token from the session. DEBUG09:57:36securityUser was reloaded from a user provider. INFO09:57:36phpUser Deprecated: Not specifying the optional ShopConstraint parameter is deprecated since version 1.7.8.0 INFO09:57:36phpUser Deprecated: Not specifying the optional ShopConstraint parameter is deprecated since version 1.7.8.0 INFO09:57:36phpUser Deprecated: Not specifying the optional ShopConstraint parameter is deprecated since version 1.7.8.0 INFO09:57:36phpUser Deprecated: Not specifying the optional ShopConstraint parameter is deprecated since version 1.7.8.0 INFO09:57:36phpUser Deprecated: Not specifying the optional ShopConstraint parameter is deprecated since version 1.7.8.0 INFO09:57:36phpUser Deprecated: Creating Doctrine\ORM\Mapping\UnderscoreNamingStrategy without making it number aware is deprecated and will be removed in Doctrine ORM 3.0. INFO09:57:36phpUser Deprecated: Not specifying the optional ShopConstraint parameter is deprecated since version 1.7.8.0 INFO09:57:36phpUser Deprecated: PrestaShop\PrestaShop\Core\Domain\Order\QueryResult\OrderInvoiceAddressForViewing is deprecated since version 1.7.7.5 and will be removed in the next major version. Use PrestaShop\PrestaShop\Core\Domain\Order\QueryResult\OrderForViewing::getInvoiceAddressFormatted() instead. INFO09:57:36phpUser Deprecated: Not specifying the optional ShopConstraint parameter is deprecated since version 1.7.8.0 INFO09:57:36phpUser Deprecated: PrestaShop\PrestaShop\Core\Domain\Order\QueryResult\OrderInvoiceAddressForViewing is deprecated since version 1.7.7.5 and will be removed in the next major version. Use PrestaShop\PrestaShop\Core\Domain\Order\QueryResult\OrderForViewing::getShippingAddressFormatted() instead. CRITICAL09:57:36phpType error: Argument 3 passed to PrestaShop\PrestaShop\Core\Domain\Order\QueryResult\OrderStatusForViewing::__construct() must be of the type string, null given, called in /home/osotaoda/public_html/src/Adapter/Order/QueryHandler/GetOrderForViewingHandler.php on line 367 INFO09:57:36phpUser Deprecated: Implementing "Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface" without the "reset()" method is deprecated since Symfony 3.4 and will be unsupported in 4.0 for class "Csa\Bundle\GuzzleBundle\DataCollector\GuzzleCollector". CRITICAL09:57:36requestUncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Type error: Argument 3 passed to PrestaShop\PrestaShop\Core\Domain\Order\QueryResult\OrderStatusForViewing::__construct() must be of the type string, null given, called in /home/osotaoda/public_html/src/Adapter/Order/QueryHandler/GetOrderForViewingHandler.php on line 367" at /home/osotaoda/public_html/src/Core/Domain/Order/QueryResult/OrderStatusForViewing.php line 83 when in debug mode also have a seconde warning when log in Notice na linha 300 do ficheiro /home/osotaoda/public_html/classes/module/Module.php [8] Trying to access array offset on value of type null Notice na linha 304 do ficheiro /home/osotaoda/public_html/classes/module/Module.php [8] Trying to access array offset on value of type null Notice na linha 308 do ficheiro /home/osotaoda/public_html/classes/module/Module.php [8] Trying to access array offset on value of type null Notice na linha 312 do ficheiro /home/osotaoda/public_html/classes/module/Module.php [8] Trying to access array offset on value of type null /** * Constructor. * * @param string $name Module unique name * @param Context $context */ public function __construct($name = null, Context $context = null) { if (isset($this->ps_versions_compliancy) && !isset($this->ps_versions_compliancy['min'])) { $this->ps_versions_compliancy['min'] = '1.4.0.0'; } if (isset($this->ps_versions_compliancy) && !isset($this->ps_versions_compliancy['max'])) { $this->ps_versions_compliancy['max'] = _PS_VERSION_; } if (strlen($this->ps_versions_compliancy['min']) == 3) { $this->ps_versions_compliancy['min'] .= '.0.0'; } if (strlen($this->ps_versions_compliancy['min']) == 5) { $this->ps_versions_compliancy['min'] .= '.0'; } if (strlen($this->ps_versions_compliancy['max']) == 5) { $this->ps_versions_compliancy['max'] .= '.999'; } if (strlen($this->ps_versions_compliancy['max']) == 3) { $this->ps_versions_compliancy['max'] .= '.999.999'; } Link to comment Share on other sites More sharing options...
bmcarvalho Posted March 13, 2023 Author Share Posted March 13, 2023 (edited) CHanged PHP verision to ALT_7.3.33 and the second issue is now gone but regarding some of the orders still no improvement Edited March 13, 2023 by bmcarvalho (see edit history) Link to comment Share on other sites More sharing options...
NPO Posted March 14, 2023 Share Posted March 14, 2023 Hello, First thing would be to try to update the tables. If you scroll down you will find the update for the orders plus another table that may be having problems. https://github.com/PrestaShop/PrestaShop/issues/22215 Link to comment Share on other sites More sharing options...
JBW Posted March 15, 2023 Share Posted March 15, 2023 I have seen this errror in a shop today. It was caused by missing (value set as 0 for id) order status in table ps_oder_history. 1 Link to comment Share on other sites More sharing options...
AcidLava Posted October 27, 2023 Share Posted October 27, 2023 Hello, I have the same issue and there are no missing order status in ps_order_history in my case. Any idea please ? Thanks. Link to comment Share on other sites More sharing options...
JBW Posted October 28, 2023 Share Posted October 28, 2023 Whats your error message`? Link to comment Share on other sites More sharing options...
AcidLava Posted October 28, 2023 Share Posted October 28, 2023 Hello, Here is the error. Thank you. Link to comment Share on other sites More sharing options...
JBW Posted October 28, 2023 Share Posted October 28, 2023 Its missing the name for order status id 14. Check this status Link to comment Share on other sites More sharing options...
AcidLava Posted October 28, 2023 Share Posted October 28, 2023 (edited) Could you please tell me how to check this ? I'm in ps_order_history, are you talking about id_order_state ? What I am supposed to check ? Thanks. Edited October 28, 2023 by AcidLava (see edit history) Link to comment Share on other sites More sharing options...
JBW Posted October 28, 2023 Share Posted October 28, 2023 In Bakoffice go to Shop Parameters->Order Settings->Statuses and check ID 14 (does exist in Standard installation) Link to comment Share on other sites More sharing options...
AcidLava Posted October 28, 2023 Share Posted October 28, 2023 (edited) Thanks, it doesn't exist anymore. Should I make one in database with ID 14 ? Edited October 28, 2023 by AcidLava (see edit history) Link to comment Share on other sites More sharing options...
JBW Posted October 28, 2023 Share Posted October 28, 2023 Yes, this would solve the issue - I would create one on BO and change its ID to 14 in DB - don't forget a DB backup before doing any DB manipulations Link to comment Share on other sites More sharing options...
AcidLava Posted October 28, 2023 Share Posted October 28, 2023 Perfect it works, thanks a lot. Any idea on how to check all the orders that might be concerned (with other missing states) ? Link to comment Share on other sites More sharing options...
JBW Posted October 28, 2023 Share Posted October 28, 2023 Try something like this SQL SELECT * FROM `ps_order_history` where `id_order_state` NOT IN (SELECT id_order_state FROM ps_order_state) 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