bluedynamics / bda.plone.orders

Orders persistence and backoffice UI for bda.plone.shop
Other
1 stars 7 forks source link

Error in the order detail if the product no longer exists #20

Closed marfago closed 7 years ago

marfago commented 9 years ago

If the product is removed from the database the order details show an error as follows:

Traceback (most recent call last): File "/usr/local/Plone-Prod/devsrc/bda.plone.ajax/src/bda/plone/ajax/action.py", line 46, in ajaxaction ret['payload'] = view() File "/usr/local/Plone-Prod/devsrc/bda.plone.orders/src/bda/plone/orders/browser/views.py", line 815, in call return super(OrderView, self).call() File "/usr/local/Plone-Prod/eggs/Zope2-2.13.22-py2.7.egg/Products/Five/browser/metaconfigure.py", line 479, in call return self.index(_args, _kw) File "/usr/local/Plone-Prod/eggs/Zope2-2.13.22-py2.7.egg/Products/Five/browser/pagetemplatefile.py", line 125, in call return self.im_func(im_self, _args, _kw) File "/usr/local/Plone-Prod/eggs/Zope2-2.13.22-py2.7.egg/Products/Five/browser/pagetemplatefile.py", line 59, in call sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0), File "/usr/local/Plone-Prod/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 132, in pt_render strictinsert=0, sourceAnnotations=sourceAnnotations File "/usr/local/Plone-Prod/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 240, in call interpreter() File "/usr/local/Plone-Prod/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 271, in call self.interpret(self.program) File "/usr/local/Plone-Prod/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 343, in interpret handlers[opcode](self, args) File "/usr/local/Plone-Prod/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 819, in do_loop_tal iterator = self.engine.setRepeat(name, expr) File "/usr/local/Plone-Prod/eggs/zope.tales-3.5.3-py2.7.egg/zope/tales/tales.py", line 682, in setRepeat expr = self.evaluate(expr) File "/usr/local/Plone-Prod/eggs/zope.tales-3.5.3-py2.7.egg/zope/tales/tales.py", line 696, in evaluate return expression(self) File "/usr/local/Plone-Prod/eggs/zope.tales-3.5.3-py2.7.egg/zope/tales/expressions.py", line 217, in call return self._eval(econtext) File "/usr/local/Plone-Prod/eggs/Zope2-2.13.22-py2.7.egg/Products/PageTemplates/Expressions.py", line 147, in _eval ob = self._subexprs-1 File "/usr/local/Plone-Prod/eggs/zope.tales-3.5.3-py2.7.egg/zope/tales/expressions.py", line 124, in _eval ob = self._traverser(ob, element, econtext) File "/usr/local/Plone-Prod/eggs/Zope2-2.13.22-py2.7.egg/Products/PageTemplates/Expressions.py", line 97, in trustedBoboAwareZopeTraverse request=request) File "/usr/local/Plone-Prod/eggs/zope.traversing-3.13.2-py2.7.egg/zope/traversing/adapters.py", line 136, in traversePathElement return traversable.traverse(nm, further_path) File "/usr/local/Plone-Prod/eggs/zope.traversing-3.13.2-py2.7.egg/zope/traversing/adapters.py", line 50, in traverse raise LocationError(subject, name) LocationError: (, 'listing')

rnixx commented 7 years ago

Fixed via https://github.com/bluedynamics/bda.plone.orders/commit/ac07d8a6ed076fd98594ae67377230bca1b67420