[Zope-PTK] Re: ZClass dtml add method
Bill Anderson
bill@libc.org
Fri, 23 Feb 2001 01:11:30 -0700
Dave Woolston wrote:
> Hello Bill,
>
>
>>> We recently went through adding ZClass based portal content and created
>>> a tutorial which was just released to the dogbowl. This may help you.
>>>
>>> http://cmf.zope.org/Members/davew
>>
>>
>> A few issues:
>>
>> o Can't import the .zexp, Zope complains about an invalid export headr
>
> (that's a new one to me).
>
> I tried this again from scratch and had no problems, can you try downloading
> it again??
hrmph, I can't reproduce it either ...
>> o In the portal_tpyes tool, there doesn't seem to be a
>
> 'ContentTypeInformation' entry in the add list.
>
> Yes - Shane has updated the portal_types tool to no longer use this. The
> correct way to add content type - would be to:
>
> Add Factory-based Type Information from the portal_types tool.
Selecting atype as defualt, or leave as (none)?
> The slight differences in this method that the one outlined in the tutorial
> are:
> Product name - (i.e. PortalPoll)
> Factory method in product - this is the method that resides in your product
> to call to create the object (i.e. addPortalClassPy)
In the product folder, or in the zclass?
Anyway, I've imported the product and added th addPortalClassPy, and
followed the steps above ...
but ...
it doesn't want to work:
Traceback (innermost last):
File /local/ZopeSites/Zope2/lib/python/ZPublisher/Publish.py, line 222,
in publish_module
File /local/ZopeSites/Zope2/lib/python/ZPublisher/Publish.py, line 187,
in publish
File /local/ZopeSites/Zope2/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: LockableItem)
File /local/ZopeSites/Zope2/lib/python/ZPublisher/Publish.py, line 171,
in publish
File /local/ZopeSites/Zope2/lib/python/ZPublisher/mapply.py, line 160,
in mapply
(Object: invokeFactory)
File /local/ZopeSites/Zope2/lib/python/ZPublisher/Publish.py, line 112,
in call_object
(Object: invokeFactory)
File
/local/ZopeSites/Zope2/lib/python/Products/PTKBase/PortalFolder.py, line
377, in invokeFactory
(Object: LockableItem)
File /local/ZopeSites/Zope2/lib/python/Products/PTKBase/TypesTool.py,
line 660, in constructContent
(Object: LockableItem)
File /local/ZopeSites/Zope2/lib/python/Products/PTKBase/TypesTool.py,
line 414, in constructInstance
(Object: ElementWithAttributes)
File /local/ZopeSites/Zope2/lib/python/Products/PTKBase/TypesTool.py,
line 385, in _getFactoryMethod
(Object: ElementWithAttributes)
File /local/ZopeSites/Zope2/lib/python/App/FactoryDispatcher.py, line
99, in __getitem__
File /local/ZopeSites/Zope2/lib/python/App/FactoryDispatcher.py, line
102, in __bobo_traverse__
File /local/ZopeSites/Zope2/lib/python/App/Product.py, line 135, in
_product
(Object: LockableItem)
AttributeError: (see above)
LockableItem is a new one for me too, soooo
what am I doing wrong here, os is it a bug?
Bill