Re: [Product-Developers] invokeFactory() failing on Plone 4 (PTC) but working on Plone 3

2010-11-22 Thread Eric Bréhault
Thank you very much for this solution !! I spent hours trying to understand why my product was not setting up properly in my tests. Now I have moved installProduct call outside onsetup, it works fine. As it used to work when called from onsetup in Plone 3, it would probably a good thing to

Re: [Product-Developers] invokeFactory() failing on Plone 4 (PTC) but working on Plone 3

2010-11-22 Thread David Glick
On 11/22/10 2:44 AM, Eric Bréhault wrote: Thank you very much for this solution !! I spent hours trying to understand why my product was not setting up properly in my tests. Now I have moved installProduct call outside onsetup, it works fine. As it used to work when called from onsetup in

Re: [Product-Developers] invokeFactory() failing on Plone 4 (PTC) but working on Plone 3

2010-11-20 Thread David Glick
On 11/19/10 10:57 PM, Ross Patterson wrote: Andreas Jung li...@zopyx.com writes: Ross Patterson wrote: Your ZCML doesn't incldue five:registerPackage Does not help after adding registerPackage:

Re: [Product-Developers] invokeFactory() failing on Plone 4 (PTC) but working on Plone 3

2010-11-20 Thread David Glick
On 11/20/10 9:21 PM, product-developers@lists.plone.org wrote: David Glick wrote: On 11/19/10 10:57 PM, Ross Patterson wrote: Andreas Jung li...@zopyx.com writes: Ross Patterson wrote: Your ZCML doesn't incldue five:registerPackage Does not help after adding registerPackage:

Re: [Product-Developers] invokeFactory() failing on Plone 4 (PTC) but working on Plone 3

2010-11-19 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Eric Bréhault wrote: Hello, I have the same issue. The strange thing is it fails in tests only, but it works with the Plone UI. I guess there is an extra something we need to declare in the test onsetup to make sure our custom archetypes are

Re: [Product-Developers] invokeFactory() failing on Plone 4 (PTC) but working on Plone 3

2010-11-19 Thread David Glick
On 11/19/10 6:47 AM, Andreas Jung wrote: I have the following code for testing EasyNewsletter: http://svn.plone.org/svn/collective/Products.EasyNewsletter/trunk/Products/EasyNewsletter/tests/test_enl.py The invokeFactory('EasyNewsletter') call works on Plone 3 but fails on Plone 4 with

Re: [Product-Developers] invokeFactory() failing on Plone 4 (PTC) but working on Plone 3

2010-11-19 Thread Ross Patterson
David Glick davidgl...@groundwire.org writes: On 11/19/10 6:47 AM, Andreas Jung wrote: I have the following code for testing EasyNewsletter: http://svn.plone.org/svn/collective/Products.EasyNewsletter/trunk/Products/EasyNewsletter/tests/test_enl.py The invokeFactory('EasyNewsletter') call

Re: [Product-Developers] invokeFactory() failing on Plone 4 (PTC) but working on Plone 3

2010-11-19 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David Glick wrote: Why does this fail on Plone 4? Not sure why, but I would guess EasyNewsletter's initialize method isn't getting called in your test setup for some reason. Neither I see initialize() being called nor site.zcml being loaded

Re: [Product-Developers] invokeFactory() failing on Plone 4 (PTC) but working on Plone 3

2010-11-19 Thread Ross Patterson
Andreas Jung li...@zopyx.com writes: David Glick wrote: Why does this fail on Plone 4? Not sure why, but I would guess EasyNewsletter's initialize method isn't getting called in your test setup for some reason. Neither I see initialize() being called nor site.zcml being loaded although

Re: [Product-Developers] invokeFactory() failing on Plone 4 (PTC) but working on Plone 3

2010-11-19 Thread Ross Patterson
Andreas Jung li...@zopyx.com writes: Ross Patterson wrote: Your ZCML doesn't incldue five:registerPackage Does not help after adding registerPackage: http://svn.plone.org/svn/collective/Products.EasyNewsletter/trunk/Products/EasyNewsletter/configure.zcml nor does your test setup call