Submitted by : SimonMichael at: 2004-06-15T13:06:14+00:00 (13 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

Apparently this is still required; I can't see why yet. I have replaced this file, so if you were getting these errors pull the latest from darcs.

Here's what I see in the debugger:

 >>> app.zwikib.TestPage.render(bare=1)
 Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/zope1/Products/ZWiki/ZWikiPage.py", line 232, in render
    return self.pageType().render(self, REQUEST, RESPONSE, **kw)
  File "/zope1/Products/ZWiki/pagetypes/stx.py", line 92, in render
    t = page.renderMidsectionIn(t)
  File "/zope1/Products/ZWiki/ZWikiPage.py", line 303, in renderMidsectionIn
    return doc + self.renderMidsection() + discussion
  File "/zope1/Products/ZWiki/ZWikiPage.py", line 306, in renderMidsection
    if self.subtopicsEnabled(): return self.subtopics(deep=1)
  File "/zope1/Products/ZWiki/OutlineSupport.py", line 420, in subtopicsEnabled
    elif self.primaryParent():
  File "/zope1/Products/ZWiki/OutlineSupport.py", line 261, in primaryParent
    if p: return self.pageWithName(p)
  File "/zope1/Products/ZWiki/ZWikiPage.py", line 976, in pageWithName
    return (self.pageWithId(self.canonicalIdFrom(name),url_quoted))
  File "/zope1/Products/ZWiki/ZWikiPage.py", line 954, in pageWithId
    if id in f.objectIds() and self.isZwikiPage(f[id]): # poor caching
  File "/zope1/Products/ZWiki/Utils.py", line 191, in isZwikiPage
    return getattr(object,'meta_type',None) == self.meta_type
  File "/usr/local/src/Zope-2.7.1-b2/lib/python/ZODB/Connection.py", line 562, in setstate
    self._set_ghost_state(obj, p)
  File "/usr/local/src/Zope-2.7.1-b2/lib/python/ZODB/Connection.py", line 601, in _set_ghost_state
    state = unpickler.load()
 ImportError: No module named PageTypes
 >>> app.zwikib.TestPage.pageType()
 <ZwikiStxPageType 'stx (Structured Text)' at 0x41a83e0c>
 >>> app.zwikib.TestPage.pageType().__class__
 <class Products.ZWiki.pagetypes.stx.ZwikiStxPageType at 0x40fc535c>
 >>> app.zwikib.TestPage.pageType().__module__
 'Products.ZWiki.pagetypes.stx'

I expected to see some reference to PageTypes? to explain this.