Jump to content
passio

1.7 -> Onglet "Facture" - Erreur critique

Recommended Posts

Bonsoir, voilà que j'ai passé la journée à migrer de 1.6 vers 1.7... J'ai corrigé beaucoup de problèmes mais il ne reste que celui-ci pour que tout soit parfait. Lorsque je vais dans "Commande->Facture", j'ai l'erreur suivante, possiblement parce qu'il y aurait eu dans ma vie des erreurs où la facture n'aurait pas été généré ? Mais comment savoir où, dans des milliers de commandes... et encore, c'est qu'une supposition.

Quote

 

Symfony\Component\Form\Exception\UnexpectedTypeException
in vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataMapper/PropertyPathMapper.php (line 41)

PropertyPathMapper->mapDataToForms('', object(RecursiveIteratorIterator))in vendor/symfony/symfony/src/Symfony/Component/Form/Form.php (line 379)

Form->setData('')in vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataMapper/PropertyPathMapper.php (line 49)

PropertyPathMapper->mapDataToForms(array('enable_invoices' => true, 'enable_tax_breakdown' => false, 'enable_product_images' => true, 'invoice_prefix' => array('#FA', false, false), 'add_current_year' => false, 'reset_number_annually' => false, 'year_position' => 0, 'invoice_number' => 0, 'legal_free_text' => '', 'footer_text' => array('Numéro SIREN : XXXXXXXX', false, false), 'invoice_model' => 'invoice', 'use_disk_cache' => false), object(RecursiveIteratorIterator))in vendor/symfony/symfony/src/Symfony/Component/Form/Form.php (line 379)

Form->setData(array('enable_invoices' => true, 'enable_tax_breakdown' => false, 'enable_product_images' => true, 'invoice_prefix' => array('#FA', false,false), 'add_current_year' => false, 'reset_number_annually' => false, 'year_position' => 0, 'invoice_number' => 0, 'legal_free_text' => '', 'footer_text' =>array('Numéro SIREN : XXXXX', false, false), 'invoice_model' => 'invoice', 'use_disk_cache' => false))in vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataMapper/PropertyPathMapper.php (line 49)

PropertyPathMapper->mapDataToForms(array('invoice_options' => array('enable_invoices' => true, 'enable_tax_breakdown' => false, 'enable_product_images' => true, 'invoice_prefix' => array('#FA', false, false), 'add_current_year' => false, 'reset_number_annually' => false, 'year_position' => 0, 'invoice_number' => 0, 'legal_free_text' => '', 'footer_text' => array('Numéro SIREN : XXXXXXXXX', false, false), 'invoice_model' => 'invoice', 'use_disk_cache' => false)),object(RecursiveIteratorIterator))in vendor/symfony/symfony/src/Symfony/Component/Form/Form.php (line 379)

Form->setData(array('invoice_options' => array('enable_invoices' => true, 'enable_tax_breakdown' => false, 'enable_product_images' => true, 'invoice_prefix' => array('#FA', false, false), 'add_current_year' => false, 'reset_number_annually' => false, 'year_position' => 0, 'invoice_number' => 0, 'legal_free_text' => '', 'footer_text' => array('Numéro SIREN : XXXXX', false, false), 'invoice_model' => 'invoice', 'use_disk_cache' => false)))in vendor/symfony/symfony/src/Symfony/Component/Form/Form.php (line 483)

Form->initialize()in vendor/symfony/symfony/src/Symfony/Component/Form/FormBuilder.php (line 226)

FormBuilder->getForm()in src/Core/Form/FormHandler.php (line 114)

                [
                    'form_builder' => &$this->formBuilder,
                ]
            );

            return $this->formBuilder->getForm();
        }

        /**
         * {@inheritdoc}
         *

FormHandler->getForm()in src/PrestaShopBundle/Controller/Admin/Sell/Order/InvoicesController.php (line 57)
InvoicesController->indexAction(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 admin8281swqcf/index.php (line 88)

 


Avec les informations suivantes dans LOGS :

Quote

 

Level    Channel    Message
DEBUG19:55:16    doctrine    SELECT name FROM ps_module WHERE active = 1
INFO19:55:16    request    Matched route "admin_order_invoices".
DEBUG19:55:16    security    Read existing security token from the session.
DEBUG19:55:16    security    User was reloaded from a user provider.
DEBUG19:55:17    doctrine    SELECT name FROM ps_module WHERE active = 1
DEBUG19:55:17    doctrine    SELECT COUNT(o.id_order) AS nbOrders, o.current_state as id_order_state FROM `ps_order_invoice` oi LEFT JOIN `ps_orders` o ON oi.id_order = o.id_order WHERE o.id_shop IN(:shopIds) AND oi.number > 0 GROUP BY o.current_state
INFO19:55:17    php    User Deprecated: Implementing "Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface" without the "reset()" method is deprecated since Symfony 3.4 and will be unsupported in 4.0 for class "Csa\Bundle\GuzzleBundle\DataCollector\GuzzleCollector".
CRITICAL19:55:17    php    Uncaught Exception: Expected argument of type "object, array or empty", "string" given
CRITICAL19:55:17    request    Uncaught PHP Exception Symfony\Component\Form\Exception\UnexpectedTypeException: "Expected argument of type "object, array or empty", "string" given" at /Applications/MAMP/htdocs/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataMapper/PropertyPathMapper.php line 41


Uncaught Exception: Expected argument of t ype "object, array or empty" , "string" gi ven , *

 

ça veut dire qu'on passe un argument de type non attendu.... Mais où ? Et comment régler ca... Je sais qu'il y a eu dans le passé des bug au moment de la validation de la commande et que les factures n'étaient pas générée.

Share this post


Link to post
Share on other sites
Posted (edited)

Thanks, it's work for me in the PS 1.7.5.2. I got this error on 1.7 and I never installed PS 1.6 at the past.

Edited by klemonnier (see edit history)

Share this post


Link to post
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

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More