Jump to content

[solved] Getting errors after migration


iTroubl3

Recommended Posts

Hello, getting some errors when trying go to orders. This is what I get:

 

PrestaShop\PrestaShop\Core\Domain\Order\QueryResult\OrderMessageForViewing::__construct(): Argument #2 ($message) must be of type string, null given, called in /home/u924237733/domains/hotpink-dogfish-447685.hostingersite.com/public_html/src/Adapter/Order/QueryHandler/GetOrderForViewingHandler.php on line 715

 

Any ideas how to fix that? All data was migrated from 8.1.0 to 8.1.7.

 

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

  • iTroubl3 changed the title to [solved] Getting errors after migration
  • 1 year later...

HTTP 500 error when opening some orders in Back Office (PrestaShop 8.2.x)

In some cases, this error can be resolved as follows.

The Back Office shows an HTTP 500 error with the message:

OrderMessageForViewing::__construct(): Argument #2 ($message) must be of type string, null given

Cause

There are orphan records in ps_customer_thread (customer message threads) without any related messages in ps_customer_message.

PrestaShop 8.2.x does not validate this situation and fails when trying to build the order view in the Back Office.

This usually happens after:

migrations from older versions

usage of some payment or integration modules

Correct solution

Remove the orphan customer threads via phpmyadmin:

DELETE ct FROM ps_customer_thread ct LEFT JOIN ps_customer_message cm ON cm.id_customer_thread = ct.id_customer_thread WHERE cm.id_customer_message IS NULL;

Then clear the cache (var/cache/*).

 

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...