[Zope-CMF] portal poll: AttributeError
Jeff
jeff@thecolemans.ws
Mon, 16 Apr 2001 08:57:39 -0500
I'm not sure if this is will fix the problem, but I did find while working
through the tutorial that the 'Meta_Type' in the ZClass is set to
'PortalPollType' while in the portal it is 'PollClassType'. I changed it in
the portal and every thing worked great.
Thanks for the updated tutorial, it is really helping me get a handle on
Zope and the CMF (as a newbie I need all the help I can get ;-}
> Hi List, hi Dave,
>
> after playing a lot with the former early PTK (and giving up somewhere
> in time cause I couldn't keep up with the changes :)) I wanted to give
> the CMF a new chance.
>
> Works great out of the box - and the skins really rock!
> (fresh install of Zope 2.3.1, CMF1.0-Tarball, Python 1.5.2 on
> Mandrake7.2)
>
> For better understanding what makes the CMF tick I tried to get the
> portal poll up and running.
> I followed Dave's fine tutorial, and there were just two steps which
> could not be completed like stated in the tutorial:
> - the properties of the propertysheet with type of int required a value
> (not "", I used '0')
> - while adding the ZClass there's no CMF:PortalContent in the Base
> Classes, I used CMFCore:PortalContent
>
> Testing the portal poll was not successfull. After I press [Add] at 'Add
> Content' -> Poll -> ID:TestPoll, I get:
>
> Error Type: AttributeError
> Error Value: PollClassProduct
>
> --- cut ---
> Traceback (innermost last):
> File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 223,
> in publish_module
> File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 187,
> in publish
> File /usr/share/zope/lib/python/Zope/__init__.py, line 221, in
> zpublisher_exception_hook
> (Object: Traversable)
> File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 171,
> in publish
> File /usr/lib/python1.5/site-packages/ZPublisher/mapply.py, line 160,
> in mapply
> (Object: invokeFactory)
> File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 112,
> in call_object
> (Object: invokeFactory)
> File /var/zope/Products/CMFCore/PortalFolder.py, line 368, in
> invokeFactory
> (Object: Traversable)
> File /var/zope/Products/CMFCore/TypesTool.py, line 714, in
> constructContent
> (Object: Traversable)
> File /var/zope/Products/CMFCore/TypesTool.py, line 469, in
> constructInstance
> (Object: ElementWithAttributes)
> File /var/zope/Products/CMFCore/TypesTool.py, line 440, in
> _getFactoryMethod
> (Object: ElementWithAttributes)
> File /usr/share/zope/lib/python/App/FactoryDispatcher.py, line 99, in
> __getitem__
> File /usr/share/zope/lib/python/App/FactoryDispatcher.py, line 102, in
> __bobo_traverse__
> File /usr/share/zope/lib/python/App/Product.py, line 135, in _product
> (Object: Traversable)
> AttributeError: (see above)
> --- cut ---
>
> I'm fairly sure I have a fundamental typo somewhere, but I can't figure
> out what's wrong. Before I recheck things for a fourth time... maybe
> someone with more experience has an idea where to look for this
> 'AttributeEror'?
>
> Thanks in advance!