dudecorn Posted February 20 Share Posted February 20 After importing products from CMS, can't edit any of them. Such a problem: PrestaShop\PrestaShop\Core\Domain\Product\QueryResult\ProductDetails::__construct(): Argument #1 ($isbn) must be of type string, null given, called in /src/Adapter/Product/QueryHandler/GetProductForEditingHandler.php on line 389 [TypeError 0] Prestashop 8.1.4 Also exported products includes size, it is like 101-dm/41 where 41 is size and "/" is the split sign between the model and variable size. However Prestashop treats all imported products separately. When I copy the product, then can edit the copy in back office, but can't add any variables like size and colour. Any help? Link to comment Share on other sites More sharing options...
SeifF Posted February 28 Share Posted February 28 Hello, Thank you for reaching out to us. I invite you to open a ticket to the support team of PrestaShop, to help you with this issue from this link : https://support.prestashop.com/hc/fr I wish you a good day. Link to comment Share on other sites More sharing options...
musicmaster Posted February 28 Share Posted February 28 My tools Prestools has under Utilities a function "Convert NULLs into empty strings". You can use that to fix your shop. As with all major changes: make a backup before applying. 2 Link to comment Share on other sites More sharing options...
djo1919 Posted February 28 Share Posted February 28 Any update about this problem? Link to comment Share on other sites More sharing options...
djo1919 Posted February 28 Share Posted February 28 2 hours ago, musicmaster said: My tools Prestools has under Utilities a function "Convert NULLs into empty strings". You can use that to fix your shop. As with all major changes: make a backup before applying. Hello, Where to find this tool? Regards Link to comment Share on other sites More sharing options...
musicmaster Posted February 28 Share Posted February 28 3 minutes ago, djo1919 said: Hello, Where to find this tool? Regards See my forum footer. One potential cause of the problem is that you used Prestashops backup function. This has only recently be repaired. Link to comment Share on other sites More sharing options...
djo1919 Posted February 28 Share Posted February 28 (edited) After installing a fresh Prestashop 8.1.4, then I imported all the data using ets migration, I had this problem PrestaShop\PrestaShop\Core\Domain\Product\QueryResult\ProductDetails::__construct(): Argument #2 ($upc) must be of type string, null given, called in /src/Adapter/Product/QueryHandler/GetProductForEditingHandler.php on line 394 PrestaShop\PrestaShop\Core\Domain\Product\QueryResult\ProductDetails::__construct(): Argument #5 ($reference) must be of type string, null given, called in /src/Adapter/Product/QueryHandler/GetProductForEditingHandler.php on line 394 in src/Core/Domain/Product/QueryResult/ProductDetails.php (line 68) * @param string $upc * @param string $ean13 * @param string $mpn * @param string $reference */ public function __construct( string $isbn, string $upc, string $ean13, string $mpn, string $reference Do you know how to solve this? Thank you in advance Edited February 28 by djo1919 (see edit history) Link to comment Share on other sites More sharing options...
djo1919 Posted February 28 Share Posted February 28 No need to answer, I fixed it myself. Thank you for your polite answer. @dudecorn & @SeifF here's the solution below: UPDATE `ps_product` SET reference = '' WHERE reference IS NULL; UPDATE `ps_product` SET isbn = '' WHERE isbn IS NULL; UPDATE `ps_product` SET ean13 = '' WHERE ean13 IS NULL; UPDATE `ps_product` SET upc = '' WHERE upc IS NULL; UPDATE `ps_product` SET mpn = '' WHERE mpn IS NULL; 2 Link to comment Share on other sites More sharing options...
musicmaster Posted February 29 Share Posted February 29 (edited) ISBN, like many other fields, is in the database defined as "default NULL". However, when those fields are saved in the backoffice they are always saved as empty strings when not set. This has become so common that the software gives warnings when such a value does have NULLs. ISBN is a field that was introduced in Prestashop 1.7. Most likely the software you were using was built for an older Prestashop version and never upgraded to cover this field. And as it was not defined when the ps_product records were created it got the default value of NULL. Edited March 2 by musicmaster (see edit history) Link to comment Share on other sites More sharing options...
Vadimuch Posted April 10 Share Posted April 10 On 2/28/2024 at 8:48 PM, musicmaster said: My tools Prestools has under Utilities a function "Convert NULLs into empty strings". You can use that to fix your shop. As with all major changes: make a backup before applying. Дякую за чудове рішення, та софт, який багато разів допомогав. Описану вище проблему саме так і вирішив. Дякую!! Link to comment Share on other sites More sharing options...
Włochaty Posted April 13 Share Posted April 13 Migration 1.7.8 to 8.1.5. I have this type of errors too. $isbn fixed like @djo1919 suggest. But also /index.php/sell/catalog/products-v2/1164/edit?_token=*** PrestaShop\PrestaShop\Core\Domain\Product\Supplier\QueryResult\ProductSupplierForEditing::__construct(): Argument #5 ($reference) must be of type string, null given, called in /src/Adapter/Product/AbstractProductSupplierHandler.php on line 83 I think this is for supplier reference in table ps_product_supplier (product_supplier_reference Default=NULL) when I changed to '' or string it works. Are you agree with this? If yes then it is a problem with ETS migration module? 1 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