Cuquel Posted January 4, 2021 Share Posted January 4, 2021 Bonjour a tous et meilleurs vœux ! Pour bien commencer l'année, j'ai un joli bug sur mon site depuis que je suis passé a la dernière version 1.7.7.0 Lorsque je clique sur une commande qui vient de cdiscount, je ne peux pas visualiser le détail de celle ci, j'ai une page avec ce message d'erreur : Est ce que quelqu'un pourrait m'aider car je ne suis pas un développeur et je n'y comprend pas grand chose :( Type error: Argument 6 passed to PrestaShop\PrestaShop\Core\Domain\Order\QueryResult\OrderProductForViewing::__construct() must be of the type string, null given, called in /home/marquelffg/www/src/Adapter/Order/QueryHandler/GetOrderProductsForViewingHandler.php on line 259 Exception Logs 2 Stack Trace Symfony\Component\Debug\Exception\FatalThrowableError in src/Core/Domain/Order/QueryResult/OrderProductForViewing.php (line 189) * @param string $type * @param bool $availableOutOfStock * @param array $packItems * @param OrderProductCustomizationsForViewing|null $customizations */ public function __construct( ?int $orderDetailId, int $id, int $combinationId, string $name, string $reference, OrderProductForViewing->__construct(2969, 0, 0, 'Frais de gestion', 'Frais de gestion', null, '1', '1,98 €', '1,98 €', 0, null, '1.98', '1.98', '0', '0,00 €', 0, '1,98 €', '1.98', false, '2452', '#FA002373', 'product_without_combinations', false, array(), null)in src/Adapter/Order/QueryHandler/GetOrderProductsForViewingHandler.php (line 259) GetOrderProductsForViewingHandler->handle(object(GetOrderProductsForViewing))in src/Adapter/Order/QueryHandler/GetOrderForViewingHandler.php (line 801) GetOrderForViewingHandler->getOrderProducts(object(OrderId))in src/Adapter/Order/QueryHandler/GetOrderForViewingHandler.php (line 188) GetOrderForViewingHandler->handle(object(GetOrderForViewing))in vendor/league/tactician/src/Handler/CommandHandlerMiddleware.php (line 71) CommandHandlerMiddleware->execute(object(GetOrderForViewing), object(Closure))in vendor/league/tactician/src/CommandBus.php (line 62) CommandBus->League\Tactician\{closure}(object(GetOrderForViewing))in src/Core/CommandBus/Middleware/CommandRegisterMiddleware.php (line 79) CommandRegisterMiddleware->execute(object(GetOrderForViewing), object(Closure))in vendor/league/tactician/src/CommandBus.php (line 62) CommandBus->League\Tactician\{closure}(object(GetOrderForViewing))in vendor/league/tactician/src/CommandBus.php (line 42) CommandBus->handle(object(GetOrderForViewing))in src/Core/CommandBus/TacticianCommandBusAdapter.php (line 54) TacticianCommandBusAdapter->handle(object(GetOrderForViewing))in src/PrestaShopBundle/Controller/Admin/Sell/Order/OrderController.php (line 401) OrderController->viewAction(2477, object(Request))in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 151) HttpKernel->handleRaw(object(Request), 1)in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 68) HttpKernel->handle(object(Request), 1, false)in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php (line 200) Kernel->handle(object(Request), 1, false)in admin1033/index.php (line 82) Link to comment Share on other sites More sharing options...
Cuquel Posted January 7, 2021 Author Share Posted January 7, 2021 Personne aurait une idée ? Link to comment Share on other sites More sharing options...
Cuquel Posted March 4, 2021 Author Share Posted March 4, 2021 Avec la dernière mise a jour de prestashop, le message a changé, ce n'est pas sur toutes les commandes mais certaines.. Et je ne sais pas pourquoi. Voici le message d'erreur que j'ai : Type error: Argument 6 passed to PrestaShop\PrestaShop\Core\Domain\Order\QueryResult\OrderProductForViewing::__construct() must be of the type string, null given, called in /home/marquelffg/www/src/Adapter/Order/QueryHandler/GetOrderProductsForViewingHandler.php on line 272 [Symfony\Component\Debug\Exception\FatalThrowableError 0] Est ce que quelqu'un qui comprends le langage pourrait m'expliquer ce que cela veut dire ? Merci d'avance pour votre aide car je suis coincé depuis plusieurs mois maintenant... Link to comment Share on other sites More sharing options...
Michel presta Posted October 15 Share Posted October 15 Bonjour à tous, je ressort ce vieux topic car depuis un certain temps je ne peux pas visualiser les commandes sur mon site (je ne peux donc pas faire des remboursements ou autres choses qui se font depuis la page de la commande) je suis sous Prestashop 1.7.8.3 et voici l'erreur en mode débug: Type error: Argument 6 passed to PrestaShop\PrestaShop\Core\Domain\Order\QueryResult\OrderProductForViewing::__construct() must be of the type string, null given, called in /home/iskm0582/public_html/src/Adapter/Order/QueryHandler/GetOrderProductsForViewingHandler.php on line 247 et ensuite: in src/Core/Domain/Order/QueryResult/OrderProductForViewing.php (line 189) OrderProductForViewing->__construct(null, 2231, 0, 'MIJOTÉ DE CANARD 700G', '2086', null, '1', 0, 0, 38, '/img/tmp/product_mini_2231_0.jpg?time=1729004063', '0', '0', '0', '0,00 €', 0, '0,00 €', '0', '', null, '', 'product_without_combinations', false)in src/Adapter/Order/QueryHandler/GetOrderProductsForViewingHandler.php (line 247) GetOrderProductsForViewingHandler->handle(object(GetOrderProductsForViewing))in src/Adapter/Order/QueryHandler/GetOrderForViewingHandler.php (line 848) GetOrderForViewingHandler->getOrderProducts(object(OrderId), 'DESC')in src/Adapter/Order/QueryHandler/GetOrderForViewingHandler.php (line 212) GetOrderForViewingHandler->handle(object(GetOrderForViewing))in vendor/league/tactician/src/Handler/CommandHandlerMiddleware.php (line 71) CommandHandlerMiddleware->execute(object(GetOrderForViewing), object(Closure))in vendor/league/tactician/src/CommandBus.php (line 62) CommandBus->League\Tactician\{closure}(object(GetOrderForViewing))in src/Core/CommandBus/Middleware/CommandRegisterMiddleware.php (line 79) CommandRegisterMiddleware->execute(object(GetOrderForViewing), object(Closure))in vendor/league/tactician/src/CommandBus.php (line 62) CommandBus->League\Tactician\{closure}(object(GetOrderForViewing))in vendor/league/tactician/src/CommandBus.php (line 42) CommandBus->handle(object(GetOrderForViewing))in src/Core/CommandBus/TacticianCommandBusAdapter.php (line 54) TacticianCommandBusAdapter->handle(object(GetOrderForViewing))in src/PrestaShopBundle/Controller/Admin/Sell/Order/OrderController.php (line 420) OrderController->viewAction(161, object(Request))in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 151) HttpKernel->handleRaw(object(Request), 1)in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 68) HttpKernel->handle(object(Request), 1, false)in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php (line 200) Kernel->handle(object(Request), 1, false)in admin237qg7mfm/index.php (line 82) merci à ceux qui se pencherons sur mon cas. Link to comment Share on other sites More sharing options...
EISEAL Posted October 21 Share Posted October 21 Bonjour, essaie cette requete SQL dans ta base de données (Si "ps_" est le préfixe de ta base de données bien entendu) : 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_order_detail SET product_ean13 = '' WHERE product_ean13 IS NULL; UPDATE ps_orders SET gift_message = '' WHERE gift_message IS NULL; UPDATE ps_orders SET shipping_number = '' WHERE shipping_number 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 ean13 = '' WHERE ean13 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 reference = '' WHERE reference 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 = '2020-12-01' WHERE available_date IS NULL;*/ UPDATE ps_product SET available_date = '0000-00-00' 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 = '2020-12-01' WHERE available_date IS NULL;*/ UPDATE ps_product_shop SET available_date = '0000-00-00' WHERE available_date IS NULL; UPDATE ps_product_shop SET cache_default_attribute = '0' WHERE cache_default_attribute IS NULL; UPDATE ps_product_shop SET low_stock_threshold = '0' WHERE low_stock_threshold 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_address SET phone = '' WHERE phone IS NULL; UPDATE ps_address SET phone_mobile = '' WHERE phone_mobile IS NULL; update ps_customer set company = '' where company is null; update ps_customer set siret = '' where siret is null; update ps_customer set ape = '' where ape is null; update ps_customer set ip_registration_newsletter = '' where ip_registration_newsletter is null; update ps_customer set website = '' where website is null; update ps_customer set note = '' where note is null; update ps_order_invoice set note = '' where note is null; update ps_order_state set module_name = '' where module_name is null; Link to comment Share on other sites More sharing options...
Michel presta Posted October 21 Share Posted October 21 Il y a 3 heures, EISEAL a dit : Bonjour, essaie cette requete SQL dans ta base de données (Si "ps_" est le préfixe de ta base de données bien entendu) : 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_order_detail SET product_ean13 = '' WHERE product_ean13 IS NULL; UPDATE ps_orders SET gift_message = '' WHERE gift_message IS NULL; UPDATE ps_orders SET shipping_number = '' WHERE shipping_number 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 ean13 = '' WHERE ean13 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 reference = '' WHERE reference 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 = '2020-12-01' WHERE available_date IS NULL;*/ UPDATE ps_product SET available_date = '0000-00-00' 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 = '2020-12-01' WHERE available_date IS NULL;*/ UPDATE ps_product_shop SET available_date = '0000-00-00' WHERE available_date IS NULL; UPDATE ps_product_shop SET cache_default_attribute = '0' WHERE cache_default_attribute IS NULL; UPDATE ps_product_shop SET low_stock_threshold = '0' WHERE low_stock_threshold 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_address SET phone = '' WHERE phone IS NULL; UPDATE ps_address SET phone_mobile = '' WHERE phone_mobile IS NULL; update ps_customer set company = '' where company is null; update ps_customer set siret = '' where siret is null; update ps_customer set ape = '' where ape is null; update ps_customer set ip_registration_newsletter = '' where ip_registration_newsletter is null; update ps_customer set website = '' where website is null; update ps_customer set note = '' where note is null; update ps_order_invoice set note = '' where note is null; update ps_order_state set module_name = '' where module_name is null; Bonjour et merci Qu'est sensé faire cette requette stp? Link to comment Share on other sites More sharing options...
EISEAL Posted October 21 Share Posted October 21 (edited) Remplacer les IS NULL par les valeurs par défaut des nouvelles versions de prestashop C'est une erreur connue dans prestashop : https://github.com/PrestaShop/PrestaShop/issues/22215 EVIDEMENT TOUJOURS FAIRE UNE SAUVEGARDE AVANT TOUTE MANIP DANS LA BASE ! Edited October 21 by EISEAL (see edit history) Link to comment Share on other sites More sharing options...
Michel presta Posted October 21 Share Posted October 21 (edited) J'ai exécuté la requête et c'est toujours pareil 😭 vidé le cache etc. Une autre piste peut être? Par rapport au premier message d'erreur peut être: Attempted to load class "OrderProductForViewing" from namespace "PrestaShop\PrestaShop\Core\Domain\Order\QueryResult". Did you forget a "use" statement for another namespace? [Symfony\Component\Debug\Exception\ClassNotFoundException 0] Edited October 21 by Michel presta (see edit history) Link to comment Share on other sites More sharing options...
EISEAL Posted October 21 Share Posted October 21 Mince pourtant ton problème a l'air similaire à celui ci https://www.prestashop.com/forums/topic/1044059-error-when-try-to-acces-order/ Link to comment Share on other sites More sharing options...
Michel presta Posted October 21 Share Posted October 21 oui il semblerait que ce soit le même souci. Peut être manque t'il quelques lignes dans cette requete pour régler mon souci? 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