Hello. I don't often contribute to this list, however FWIW - I encountered the same error & spent some time yanking on hair etc. I eventually discovered a hidden file in my build out (linux) directory entitled .buildout.cfg. Deleting this and doing bin/buildout -N seemed to fix the problem. Naturally, all site configuration info gets removed at the same time though ...sigh...
RM -----Original Message----- From: Brandon Craig Rhodes <[email protected]> Reply-to: [email protected] To: getpaid-dev <[email protected]> Subject: possible solution for that cart error after buildout Date: Thu, 24 Sep 2009 20:38:04 -0400 Last week, cjj asked if I had yet seen The Error that people get when they already have something in their shopping cart, and re-run buildout, and then have the portlet crash. He was not sure how to reproduce it, so I said I would look into it if the problem happened to strike me. Well, it just happened! So I looked into it. The offending code was an expression in the GetPaid shopping cart portlet renderer that tried to get hold of the "cart" object by looking for such an attribute on the raw Plone site-root object: return bool( len( self.__parent__.cart ) ) While most of GetPaid remains a mystery to me, this just looked somehow inadvisable, so I took a look at the full cart view, which was still working, to see how it gets the shopping cart object. Its approach seemed much more sensible: cart_manager = component.getUtility( interfaces.IShoppingCartUtility ) self._cart = cart = cart_manager.get( self.context, create=True ) return cart So I cut-and-pasted this code (along with a few "import" statements) into the portlet, and it's now working just fine for me. To see the patch in the wild, run: svn diff -c 3002 https://getpaid.googlecode.com/svn/Products.PloneGetPaid/branches/brandon-no-overrides Now, I want some other people to try this putative fix before I make any wild suggestions like merging this patch into "trunk". Anyone? :-) Are you making all this up as you go along? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "getpaid-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en -~----------~----~----~----~------~----~------~--~---
