Jump to content

Cannot cancel order prestashop 1.7


Recommended Posts

  • 5 weeks later...

Hi,

I get the same issue.

 

Next exception 'LogicException' with message 'Request stack is empty' in /srv/data/web/vhosts/www.mywebsite.com/htdocs/app/bootstrap.php.cache:3216
Stack trace:
#0 [internal function]: Symfony\Component\HttpKernel\HttpKernel->terminateWithException(Object(Symfony\Component\Debug\Exception\UndefinedMethodException))
#1 /srv/data/web/vhosts/www.mywebsite.com/htdocs/app/cache/prod/classes.php(2072): call_user_func(Array, Object(Symfony\Component\Debug\Exception\UndefinedMethodException))
#2 /srv/data/web/vhosts/www.mywebsite.com/htdocs/app/cache/prod/classes.php(2115): Symfony\Component\Debug\ErrorHandler->handleException(Object(Symfony\Component\Debug\Exception\FatalErrorException), Array)
#3 [internal function]: Symfony\Component\Debug\ in /srv/data/web/vhosts/www.mywebsite.com/htdocs/app/bootstrap.php.cache on line 3216
[15-Feb-2017 18:18:52 Europe/Paris] PHP Fatal error:  Uncaught exception 'Symfony\Component\DependencyInjection\Exception\InactiveScopeException' with message 'You cannot create a service ("request") of an inactive scope ("request").' in /srv/data/web/vhosts/www.mywebsite.com/htdocs/app/cache/prod/appProdProjectContainer.php:3443
Stack trace:
#0 /srv/data/web/vhosts/www.mywebsite.com/htdocs/app/bootstrap.php.cache(2222): appProdProjectContainer->getRequestService()
#1 /srv/data/web/vhosts/www.mywebsite.com/htdocs/src/PrestaShopBundle/Service/Hook/HookEvent.php(67): Symfony\Component\DependencyInjection\Container->get('request')
#2 /srv/data/web/vhosts/www.mywebsite.com/htdocs/src/Adapter/LegacyHookSubscriber.php(290): PrestaShopBundle\Service\Hook\HookEvent->getHookParameters()
#3 [internal function]: PrestaShop\PrestaShop\Adapter\LegacyHookSubscriber->__call('call_5_52', Array)
#4 [internal function]: PrestaShop\PrestaShop\Adapter\LegacyHookSubscriber->call_5_52(Object(PrestaShopBundle\Service\Hook\RenderingHookEvent), 'actionUpdateQua...', NULL)
#5 /srv/data/web/vhost in /srv/data/web/vhosts/www.mywebsite.com/htdocs/app/bootstrap.php.cache on line 3216

 

Could you help us please.

Link to comment
Share on other sites

I tested this in PS v1.7.0.4 and I can cancel orders without error.  Maybe you are using a different version, or maybe you have some custom module, override or change that is interfering.

 

If you want PS developers to look at this, and you think its a core issue, then I would report the issue to the PS forge

http://forge.prestashop.com/

 

Just note, if they cannot reproduce the issue, they will likely close the ticket.  So make sure this is something you can replicate

Link to comment
Share on other sites

It occurs with every types of payment (Credit Card, wire bank, Amazon...). Even the first orders (from J.Doe) when you install Prestashop, I can't cancel them.

I didn't try, I don't know what could happen, I'm afraid to lose some data if I remove Amazon module.

Link to comment
Share on other sites

This only useful thing I see in that error is 'actionUpdateQua', which is likely actionUpdateQuantity

#4 [internal function]: PrestaShop\PrestaShop\Adapter\LegacyHookSubscriber->call_5_52(Object(PrestaShopBundle\Service\Hook\RenderingHookEvent), 'actionUpdateQua...', NULL)

So you can check the amazon module code to see if it uses that hook 'actionUpdateQuantity', and if it does, then you likely have identified the issue, and you should contact the module author.

 

You can also temporarily disable the module and cancel a test order and see if the error goes away when the module is disabled.

 

I'm afraid to lose some data if I remove Amazon module.

 

The irony here is that you don't seem worried about using PS v1.7 which is defective to begin with, but you are worried about disabling a custom module that is likely defective

 

 

 

Link to comment
Share on other sites

After spending few hours on debugging look like this is issue in PrestaShop 1.7 

 

http://forge.prestashop.com/browse/BOOM-2265

 

Does not look like PrestaShop even try to reach module hook declaration, it's failed before. 

        $globalParameters = array('_ps_version' => _PS_VERSION_);

        if (!is_null($kernel)) {
            $globalParameters['request'] = $kernel->getContainer()->get('request');
        }

Solution could be add suggestion from http://stackoverflow.com/questions/11405202/symfony-2-cant-clear-cache-you-cannot-create-a-service-request-of-an-in

But ->enterScope already deprecated so can't be used. 

Link to comment
Share on other sites

So it looks like the issue only occurs when a module registers the actionUpdateQuantity.  So is it important that your amazon module does something during this hook?  IF you need your store to function, and can live without amazon doing something during that hook, then perhaps try removing the actionUpdateQuantity module position from the amazon module and see if the issue goes away.

Link to comment
Share on other sites

So it looks like the issue only occurs when a module registers the actionUpdateQuantity.  So is it important that your amazon module does something during this hook?  IF you need your store to function, and can live without amazon doing something during that hook, then perhaps try removing the actionUpdateQuantity module position from the amazon module and see if the issue goes away.

 

Yes of course if a hook is not registered for module order cancel is not crashed. Not sure about amazon module but in our case we need to handle qty update to correctly modify related ebay item. 

This hook used not only in order update (that could be acceptable to ignore it) but also in product update. In case of product update, it works as expected, only in case of order cancellation it's crash system.

As I can see from related ticket update it should be fixed in PS 1.7.1.1. 

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...