tank Posted January 10, 2022 Share Posted January 10, 2022 In front office I can place orders. go to account a view old orders, even old orders entered years ago before the migration In back office I cant view any orders. I can view the last 2 orders This was a migration from 1.4 to 1.78.2 all seemed to be working after migration, Just noticed problem this morning. ISee error below ype error: Argument 4 passed to PrestaShop\PrestaShop\Core\Domain\Order\QueryResult\OrderInvoiceAddressForViewing::__construct() must be of the type string, null given, called in /home/trackmat/shop17.racing.com/src/Adapter/Order/QueryHandler/GetOrderForViewingHandler.php on line 330 Symfony\Component\Debug\Exception\FatalThrowableError in src/Core/Domain/Order/QueryResult/OrderInvoiceAddressForViewing.php (line 130) * @param string $phone * @param string $phoneMobile * @param string|null $vatNumber * @param string|null $dni If null the DNI is not required for the country, else string */ public function __construct( int $addressId, string $firstName, string $lastName, string $companyName, string $address1, Link to comment Share on other sites More sharing options...
Jontee Posted January 11, 2022 Share Posted January 11, 2022 How did you solve this? Did you run a SQL-query? Do anyone have a complete list of the queries to run, and does Prestashop recommend this as an official solution? Best regards, Link to comment Share on other sites More sharing options...
tank Posted January 17, 2022 Author Share Posted January 17, 2022 An SQL query was written to remove the null, I did not write it,. I thought he posted it here, but I don't see it now. My site is a recent Migration using migrationpro Link to comment Share on other sites More sharing options...
Nickz Posted January 17, 2022 Share Posted January 17, 2022 9 minutes ago, tank said: My site is a recent Migration using migrationpro If you have the back up data you could upload those under a different domain and see those there. Link to comment Share on other sites More sharing options...
w3bsolutions Posted January 18, 2022 Share Posted January 18, 2022 On 1/11/2022 at 4:18 PM, Jontee said: How did you solve this? Did you run a SQL-query? Do anyone have a complete list of the queries to run, and does Prestashop recommend this as an official solution? Best regards, See https://github.com/PrestaShop/PrestaShop/issues/22215#issuecomment-748894921 , running those queries should do the trick. Did it for me in the past, at least. Link to comment Share on other sites More sharing options...
Jontee Posted January 18, 2022 Share Posted January 18, 2022 Thanks, I will give it a try. I hope it will also solve the issue with the order jnot appearing in the order list (only one order has the issue). Best regards, Jonathan Link to comment Share on other sites More sharing options...
MEG Venture Posted March 5, 2023 Share Posted March 5, 2023 The link in the github solved my issue. Therefore I wanted to list the steps to replicate the solution on your installation. * I strongly recommend to have a backup of your database before implementing the below steps. 1. Access to the Cpanel>PhpMyAdmin page to make modifications in your database. 2. You can find the name of your database under the backoffice>Advanced Parameters>Information>Database information>MySql Name tab. 3. On the phpmyadmin page select your database name, then click SQL tab on top. 4. Paste the below query lines into the query field and click the 'Go' button. UPDATE ps_address SET phone = '' WHERE phone IS NULL; UPDATE ps_address SET phone_mobile = '' WHERE phone_mobile IS NULL; update ps_address set dni = '' where dni is null; update ps_address set other = '' where other is null; update ps_address set address2 = '' where address2 is null; update ps_address set company = '' where company is null; update ps_address set vat_number = '' where vat_number is null; UPDATE ps_order_detail SET id_order_invoice = '0' WHERE id_order_invoice IS NULL; UPDATE ps_order_detail SET product_reference = '' WHERE product_reference IS NULL; UPDATE ps_order_detail SET product_supplier_reference = '' WHERE product_supplier_reference IS NULL; UPDATE ps_order_detail SET product_isbn = '' WHERE product_isbn IS NULL; UPDATE ps_order_detail SET product_upc = '' WHERE product_upc IS NULL; UPDATE ps_order_detail SET product_mpn = '' WHERE product_mpn IS NULL; UPDATE ps_order_detail SET download_hash = '' WHERE download_hash IS NULL; UPDATE ps_orders SET gift_message = '' WHERE gift_message IS NULL; UPDATE ps_order_payment SET transaction_id = '' WHERE transaction_id IS NULL; UPDATE ps_order_payment SET card_number = '' WHERE card_number IS NULL; UPDATE ps_order_payment SET card_brand = '' WHERE card_brand IS NULL; UPDATE ps_order_payment SET card_expiration = '' WHERE card_expiration IS NULL; UPDATE ps_order_payment SET card_holder = '' WHERE card_holder IS NULL; UPDATE ps_order_carrier SET tracking_number = '' WHERE tracking_number IS NULL; UPDATE ps_order_carrier SET id_order_invoice = '0' WHERE id_order_invoice IS NULL; UPDATE ps_order_carrier SET weight = '0' WHERE weight IS NULL; UPDATE ps_product SET isbn = '' WHERE isbn IS NULL; UPDATE ps_product SET upc = '' WHERE upc IS NULL; UPDATE ps_product SET mpn = '' WHERE mpn IS NULL; UPDATE ps_product SET unity = '' WHERE unity IS NULL; UPDATE ps_product SET supplier_reference = '' WHERE supplier_reference IS NULL; UPDATE ps_product SET location = '' WHERE location IS NULL; UPDATE ps_product SET redirect_type = '301-category' WHERE redirect_type = ''; UPDATE ps_product SET available_date = '2023-03-05' WHERE available_date IS NULL; UPDATE ps_product SET cache_default_attribute = '0' WHERE cache_default_attribute IS NULL; UPDATE ps_product_shop SET unity = '' WHERE unity IS NULL; UPDATE ps_product_shop SET redirect_type = '301-product' WHERE redirect_type = ''; UPDATE ps_product_shop SET available_date = '2023-03-05' WHERE available_date IS NULL; UPDATE ps_product_shop SET cache_default_attribute = '0' WHERE cache_default_attribute IS NULL; Link to comment Share on other sites More sharing options...
Gummiwutzel Posted May 29, 2023 Share Posted May 29, 2023 Great solution. Thx a lot! 😃 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