KillStreak Posted February 7, 2021 Share Posted February 7, 2021 I'm running a 1.7.7.1 install on PHP 7.4 (fresh install, not an upgrade) When in the back office I can see the order list, but when I try to view the order (either through clicking the order or the quick view) I get the following error: Quote Type error: Argument 2 passed to PrestaShop\PrestaShop\Core\Domain\Order\QueryResult\OrderProductCustomizationForViewing::__construct() must be of the type string, null given, called in /homepages/7/d847506733/htdocs/clickandbuilds/MumandCoSoaps/src/Adapter/Order/QueryHandler/GetOrderProductsForViewingHandler.php on line 118 [Symfony\Component\Debug\Exception\FatalThrowableError 0] I've seen a few posts with the same issue but showing different line errors in the same file - has anyone got a fix for this yet? Granted I can download the delivery note to see whats on the order for packing but this is less than an ideal way to go about it..... Thanks in advance Link to comment Share on other sites More sharing options...
Rhobur Posted February 8, 2021 Share Posted February 8, 2021 (edited) PHP 7.4 is not supported, max is PHP 7.3 (for PS 1.7.7+) Edited February 8, 2021 by Rhobur (see edit history) Link to comment Share on other sites More sharing options...
KillStreak Posted February 8, 2021 Author Share Posted February 8, 2021 24 minutes ago, Rhobur said: PHP 7.4 is not supported, max is PHP 7.3 (for PS 1.7.7+) Still get the same error on PHP 7.3 Link to comment Share on other sites More sharing options...
Rhobur Posted February 8, 2021 Share Posted February 8, 2021 I can't reproduce this on a fresh PS1.7.7.0 or a fresh PS1.7.7.1. Is it a default order with default products as installed by PS or is it a custom test order you did with some new products you added? Link to comment Share on other sites More sharing options...
KillStreak Posted February 8, 2021 Author Share Posted February 8, 2021 Install was without test data - these are all products that have been added to the site since. I only noted the fault about 3 days ago - it may have been there prior to that but I have no idea as it wasn't yet part of the testing phase. Theres been a very similar fault noted on GitHub - people are saying its to do with null values populating the database but as yet theres no fix. Wondering if its the case in this - but I'm not entirely comfortable editing tables. Link to comment Share on other sites More sharing options...
Rhobur Posted February 8, 2021 Share Posted February 8, 2021 Try to set a product with all the default fields filled, eventually a combination or two; I guess it'll work. Link to comment Share on other sites More sharing options...
joseantgv Posted February 8, 2021 Share Posted February 8, 2021 If you check /src/Adapter/Order/QueryHandler/GetOrderProductsForViewingHandler.php on line 118, it seems there is a problem with customization data. Have you created a product with customization fields? Link to comment Share on other sites More sharing options...
KillStreak Posted February 8, 2021 Author Share Posted February 8, 2021 1 hour ago, joseantgv said: If you check /src/Adapter/Order/QueryHandler/GetOrderProductsForViewingHandler.php on line 118, it seems there is a problem with customization data. Have you created a product with customization fields? Yes - but there's only one product in the whole site that uses this - its a gift voucher. Link to comment Share on other sites More sharing options...
joseantgv Posted February 8, 2021 Share Posted February 8, 2021 Have you created an order without setting this field? Link to comment Share on other sites More sharing options...
KillStreak Posted February 8, 2021 Author Share Posted February 8, 2021 Yes, and deleted the product to see if it made any difference. Then put through a completely different order - but its affecting everything in the list Link to comment Share on other sites More sharing options...
joseantgv Posted February 9, 2021 Share Posted February 9, 2021 hace 14 horas, KillStreak dijo: Yes, and deleted the product to see if it made any difference. Then put through a completely different order - but its affecting everything in the list Send me FTP access in a PM. Link to comment Share on other sites More sharing options...
KillStreak Posted February 9, 2021 Author Share Posted February 9, 2021 5 hours ago, joseantgv said: Send me FTP access in a PM. Sent Link to comment Share on other sites More sharing options...
theDoris Posted March 30, 2021 Share Posted March 30, 2021 Same issue here, ps1.7.7.2 php 7.3 when product have customization field in BO cant see order page, name is null. Did you have any solution? Link to comment Share on other sites More sharing options...
Calebopeko Posted June 9, 2021 Share Posted June 9, 2021 I also have the same issue: ps1.7.7.0 with php 7.3. When a product has a customization field, then in the BO the order page throws the above error, name is NULL. I would be interested in a solution. Link to comment Share on other sites More sharing options...
joseantgv Posted June 11, 2021 Share Posted June 11, 2021 En 10/6/2021 a las 1:07 AM, Calebopeko dijo: I also have the same issue: ps1.7.7.0 with php 7.3. When a product has a customization field, then in the BO the order page throws the above error, name is NULL. I would be interested in a solution. Could you please upload a screenshot of your error? Link to comment Share on other sites More sharing options...
yegakif658 Posted June 25, 2021 Share Posted June 25, 2021 Hello, PS 1.7.7.5, product with customization cause error 500 when I try to open order detail. If there is an order without this product, no error. Type error: Argument 2 passed to PrestaShop\PrestaShop\Core\Domain\Order\QueryResult\OrderProductCustomizationForViewing::__construct() must be of the type string, null given, called in /www/hosting/activityboardshop.pl/www/src/Adapter/Order/QueryHandler/GetOrderProductsForViewingHandler.php on line 118 error_ps.mhtml Link to comment Share on other sites More sharing options...
musicmaster Posted June 26, 2021 Share Posted June 26, 2021 Try adding a debug line to /src/Adapter/Order/QueryHandler/GetOrderProductsForViewingHandler.php and look at the output: Link to comment Share on other sites More sharing options...
yegakif658 Posted June 28, 2021 Share Posted June 28, 2021 Hi, debug info: Array ( [122] => Array ( [64] => Array ( [datas] => Array ( [1] => Array ( [0] => Array ( [id_customization] => 64 [id_address_delivery] => 122 [id_product] => 158 [id_customization_field] => [id_product_attribute] => 0 [type] => 1 [index] => 16 [value] => leontyna [id_module] => 0 [name] => ) ) ) [quantity] => 8 [quantity_refunded] => 0 [quantity_returned] => 0 [id_customization] => 64 ) ) ) Link to comment Share on other sites More sharing options...
musicmaster Posted June 29, 2021 Share Posted June 29, 2021 The rest of the structure is filled correctly. Only the name is empty. Check the ps_customization_field_lang table that the name is filled in for all active languages in your shop for this customization. You could use the "solution" below as a quick fix to work around the problem. Link to comment Share on other sites More sharing options...
yegakif658 Posted June 29, 2021 Share Posted June 29, 2021 Thank you, in DB seems to be everything ok. After work around order details are working properly. 🙂 Tomas Link to comment Share on other sites More sharing options...
ramzes_84 Posted November 30, 2021 Share Posted November 30, 2021 Hi! I have the same problem but in another line: Type error: Argument 6 passed to PrestaShop\PrestaShop\Core\Domain\Order\QueryResult\OrderProductForViewing::__construct() must be of the type string, null given, called in /www/src/Adapter/Order/QueryHandler/GetOrderProductsForViewingHandler.php on line 247 [Symfony\Component\Debug\Exception\FatalThrowableError 0] I can't reach orders wich contain pack item. All pack items have default settings Line 247 is: (bool) Product::isAvailableWhenOutOfStock(StockAvailable::outOfStock($pack_item['id_product'])) Link to comment Share on other sites More sharing options...
ramzes_84 Posted December 1, 2021 Share Posted December 1, 2021 There were "NULL" values in products in pack. Open each product in the pack and just click "save" - and "NULL" values will be automatically replaced by nothing. Or replace NULL values by nothing in PS_PRODUCT_LANG Link to comment Share on other sites More sharing options...
AleluÁ Posted June 16, 2022 Share Posted June 16, 2022 (edited) in case someone else happens... There are two possible solutions and it usually occurs at two specific points. First point: when you open a paid order to add some other product because the customer has requested it... If you try to search for the product, no results appear (the internal search does not work) --> then it must go to your database in the ps_products_attribute table, edit the "REFERENCE" section of one of the products and then edit the line inline so that it reads this command: UPDATE `ps_product_attribute` SET `reference` = ''" all references must be empty or full, not you can mark NULL. The second point where it happens is when you try to create an order from a customer abandoned order, you try to "USE" the abandoned order to load the product(s)... but it doesn't work... it also doesn't let you add it manually... at this point you go to the product and modify one letter of the name by adding a space to fix it and it will work again. Edited June 16, 2022 by AleluÁ (see edit history) 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