Jump to content

Mode debug activé


Recommended Posts

Perstashop 1.7.6.3

Je rencontre un certain nombre de bugs (error 500) en particulier quand je veux créer une commande depuis le backoffie.

J'ai activé le mode DEBUG pour voir ce que ça renvoie, le souci c'est que je n'y comprends absolument rien...

(1/1) ContextErrorException
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

in UnitOfWork.php line 2636
at ErrorHandler->handleError(2, '"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?', '/home/nailiso/www/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php', 2636, array('class' => 'Doctrine\\ORM\\UnitOfWork', 'e' => 32767, 'file' => '/home/nailiso/www/vendor/composer/../doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php'))
in DebugClassLoader.php line 156
at require()
in DebugClassLoader.php line 156
at DebugClassLoader->loadClass('Doctrine\\ORM\\UnitOfWork')
at spl_autoload_call('Doctrine\\ORM\\UnitOfWork')
in EntityManager.php line 160
at EntityManager->__construct(object(Connection), object(Configuration), object(ContainerAwareEventManager))
in EntityManager.php line 850
at EntityManager::create(object(Connection), object(Configuration))
in appDevDebugProjectContainer.php line 2079
at appDevDebugProjectContainer->getDoctrine_Orm_DefaultEntityManagerService()
in getPrestashop_Translation_DatabaseLoaderService.php line 8
at require('/home/nailiso/www/var/cache/dev/ContainerQ5t7e8j/getPrestashop_Translation_DatabaseLoaderService.php')
in appDevDebugProjectContainer.php line 1968
at appDevDebugProjectContainer->load('getPrestashop_Translation_DatabaseLoaderService.php')
in appDevDebugProjectContainer.php line 4003
at appDevDebugProjectContainer->ContainerQ5t7e8j\{closure}()
in ServiceLocator.php line 64
at ServiceLocator->get('prestashop.translation.database_loader')
in Translator.php line 141
at Translator->initialize()
in Translator.php line 127
at Translator->initializeCatalogue('fr-FR')
in Translator.php line 314
at Translator->dumpCatalogue('fr-FR', object(ResourceCheckerConfigCache))
in Translator.php line 299
at Translator->Symfony\Component\Translation\{closure}(object(ResourceCheckerConfigCache))
in ResourceCheckerConfigCacheFactory.php line 43
at ResourceCheckerConfigCacheFactory->cache('/home/nailiso/www/var/cache/dev/translations/catalogue.fr-FR.L8dqxxF.php', object(Closure))
in Translator.php line 300
at Translator->initializeCacheCatalogue('fr-FR')
in Translator.php line 265
at Translator->loadCatalogue('fr-FR')
in Translator.php line 241
at Translator->getCatalogue('fr-FR')
in Translator.php line 198
at Translator->trans('Successful deletion.', array(), 'AdminNotificationsSuccess', null)
in PrestaShopTranslatorTrait.php line 57
at Translator->trans('Successful deletion.', array(), 'AdminNotificationsSuccess', null)
in LoggingTranslator.php line 48
at LoggingTranslator->trans('Successful deletion.', array(), 'AdminNotificationsSuccess', null)
in DataCollectorTranslator.php line 50
at DataCollectorTranslator->trans('Successful deletion.', array(), 'AdminNotificationsSuccess', null)
in PrestaShopTranslatorTrait.php line 57
at DataCollectorTranslator->trans('Successful deletion.', array(), 'Admin.Notifications.Success', null)
in Controller.php line 324
at ControllerCore->trans('Successful deletion.', array('legacy' => 'htmlspecialchars'), 'Admin.Notifications.Success')
in AdminController.php line 466
at AdminControllerCore->__construct()
in LegacyContext.php line 85
at LegacyContext->getContext()
in UserLocaleListener.php line 39
at UserLocaleListener->__construct(object(LegacyContext))
in appDevDebugProjectContainer.php line 2649
at appDevDebugProjectContainer->getPrestashop_UserLocale_ListenerService()
in appDevDebugProjectContainer.php line 3136
at appDevDebugProjectContainer->ContainerQ5t7e8j\{closure}()
in EventDispatcher.php line 229
at EventDispatcher->sortListeners('kernel.request')
in EventDispatcher.php line 61
at EventDispatcher->getListeners('kernel.request')
in ContainerAwareEventDispatcher.php line 128
at ContainerAwareEventDispatcher->getListeners('kernel.request')
in TraceableEventDispatcher.php line 262
at TraceableEventDispatcher->preProcess('kernel.request')
in TraceableEventDispatcher.php line 137
at TraceableEventDispatcher->dispatch('kernel.request', object(GetResponseEvent))
in HttpKernel.php line 127
at HttpKernel->handleRaw(object(Request), 1)
in HttpKernel.php line 68
at HttpKernel->handle(object(Request), 1, false)
in Kernel.php line 200
at Kernel->handle(object(Request), 1, false)
in index.php line 86

Quelqu'un pourrait-il m'éclairer??

Cordialement.

Link to comment
Share on other sites

Bonjour @Mediacom87

J'ai basculé le site en version php7.1

La plupart des erreurs ont disparu mais il reste toujours cela en mode débug quand je veux créer une commande depuis le backoffice (ça plante quand je veux insérer un code de réduction qui implique le transport gratuit, pour être précis).

 

Symfony\Component\Debug\Exception\FatalThrowableError
in classes/PaymentModule.php (line 373)
                    $transaction_id = $extra_vars['transaction_id'];
                } else {
                    $transaction_id = null;
                }
                if (!$order->addOrderPayment($amount_paid, null, $transaction_id)) {
                    PrestaShopLogger::addLog('PaymentModule::validateOrder - Cannot save Order Payment', 3, null, 'Cart', (int) $id_cart, true);
                    throw new PrestaShopException('Can\'t save Order Payment');
                }
            }
PaymentModuleCore->validateOrder(517, 2, 0.0, 'PrestaShop Checkout', 'Comanda manuala -- Angajat: D. Feron', array(), null, false, '2a487e0b18b4b6d04d781ac1b8b958f6')in controllers/admin/AdminOrdersController.php (line 1255)
                        $this->trans('Manual order -- Employee:', array(), 'Admin.Orderscustomers.Feature') . ' ' .
                        substr($employee->firstname, 0, 1) . '. ' . $employee->lastname,
                        array(),
                        null,
                        false,
                        $cart->secure_key
                    );
                    if ($payment_module->currentOrder) {
                        Tools::redirectAdmin(self::$currentIndex . '&id_order=' . $payment_module->currentOrder . '&vieworder' . '&token=' . $this->token);
                    }
                }
AdminOrdersControllerCore->postProcess()in classes/controller/Controller.php (line 281)
            if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
                $this->setMedia();
            }
            // postProcess handles ajaxProcess
            $this->postProcess();
            if (!empty($this->redirect_after)) {
                $this->redirect();
            }
ControllerCore->run()in classes/Dispatcher.php (line 515)
            if (isset($params_hook_action_dispatcher)) {
                Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
            }
            // Running controller
            $controller->run();
            // Execute hook dispatcher after
            if (isset($params_hook_action_dispatcher)) {
                Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher);
            }
DispatcherCore->dispatch()in adminvangardis/index.php (line 97)
    if (!headers_sent()) {
        header('Content-Type: text/html; charset=utf-8');
    }
    // Prepare and trigger LEGACY admin dispatcher
    Dispatcher::getInstance()->dispatch();
}
 

 

Link to comment
Share on other sites

il y a une heure, Francesco a dit :

La plupart des erreurs ont disparu mais il reste toujours cela en mode débug quand je veux créer une commande depuis le backoffice (ça plante quand je veux insérer un code de réduction qui implique le transport gratuit, pour être précis).

Pas la moindre idée, peut être un bug spécifique lié à votre version de PrestaShop.

Perso, avec la 1.7 je ne m'aventure pas trop à comprendre les bugs multiple qui s'enchainent depuis plus de 5 ans maintenant.

Link to comment
Share on other sites

Alors, après de multiples test je viens de voir que:

- Quand je crée une commande BO pour un client qui est dans le groupe "clients", si j'essaye d'appliquer un transport gratuit de quelle que façon que ce soit, j'ai un message "aucun transporteur possible etc" -> commande impossible à générer.

- Quand je crée une commande BO pour un client qui est dans un groupe "xxx" et que je le sors du groupe "clients", le transport gratuit fonctionne.

C'est déjà ça, au moins j'ai réussi à faire ce que je désirais au départ.

Merci pour le retour en tout cas!

Link to comment
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
×
×
  • Create New...