Submitted by : 127.0.0.1 at: 2005-08-04T13:15:59+00:00 (12 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

I am running ZWiki 0.44.0, Zope 2.8, Plone 2.1.rc1. I get the following if I try to add a new wiki page anywhere but the plone root folder:

Traceback (innermost last):
 Module ZPublisher.Publish, line 113, in publish
 Module ZPublisher.mapply, line 88, in mapply
 Module ZPublisher.Publish, line 40, in call_object
 Module Products.ZWiki.Editing, line 287, in edit
 Module Products.ZWiki.Editing, line 415, in handleRename
 Module Products.ZWiki.Editing, line 528, in rename
 Module Products.ZWiki.Editing, line 571, in changeIdPreservingCreator
 Module Products.ATContentTypes.lib.autosort, line 227, in manage_renameObject
 Module Products.CMFPlone.PloneTool, line 1340, in reindexOnReorder
 Module Products.ZCatalog.CatalogBrains, line 86, in getObject
 Module OFS.Traversable, line 233, in restrictedTraverse
 Module OFS.Traversable, line 182, in unrestrictedTraverse
  - __traceback_info__: ([], 'wiki_page.2005-08-04.9989157351')
 Module Products.Archetypes.BaseObject, line 1027, in __bobo_traverse__

AttributeError?: wiki_page.2005-08-04.9989157351

property change --simon, Thu, 04 Aug 2005 13:18:44 -0700 reply

Name: '#1137 AttributeError? when adding wiki page to plone subfolders ' => '#1137 AttributeError? when adding wiki page to plone 2.1 subfolders'

property change --simon, Thu, 04 Aug 2005 13:19:02 -0700 reply

Severity: normal => serious

... --simon, Thu, 04 Aug 2005 13:21:44 -0700 reply

That's unfortunate.. I assume it only happens when you add a Wiki Page using the plone interface, so perhaps you can work around by using the ZMI to create your first page (and zwiki to create the rest).

... --Thu, 04 Aug 2005 13:27:10 -0700 reply

work around works

property change --simon, Thu, 04 Aug 2005 13:27:22 -0700 reply

Name: '#1137 AttributeError? when adding wiki page to plone 2.1 subfolders' => '#1137 adding a wiki page via plone UI breaks in plone 2.1'

it's worse than that.. --simon, Thu, 01 Sep 2005 19:42:29 -0700 reply

Name: '#1137 adding a wiki page via plone UI breaks in plone 2.1' => '#1137 editing or creating a page in plone 2.1 breaks except in the site root folder'

status --simon, Thu, 01 Sep 2005 20:47:18 -0700 reply

During the edit or initial save, zwiki renames the page object.

In AutoOrderSupport?.manage_renameObject, after the usual manageRenameObject, ATCT calls reindexOnReorder.

This calls portal_catalog(path = {'query':'/'.join(parent.getPhysicalPath()), 'depth': 1}) and gets brains, one of which corresponds to the page with its old id, and so getObject() fails.

Why did the catalog not return current results at this point ? manage_renameObject did call zwiki's manage_afterAdd which called index_object() but the latter had no effect, because the page couldn't find its catalog, because getattr no longer works. folder['portal_catalog']? works.

I've hacked catalog() to try this, and it seems to help.

status --simon, Thu, 01 Sep 2005 21:45:01 -0700 reply

Again a helpful clue from alecm. It is because the acquisition wrapper is explicit, here. obj.aq_acquire must now be used, not getattr.

The fact that ['portal_catalog'] seems to be acquiring from one level up is an anomaly. AT bug ?

seems to be fixed for Zwiki 0.45 --simon, Thu, 01 Sep 2005 21:47:37 -0700 reply

Status: open => closed

... --simon, Mon, 01 May 2006 21:55:32 -0700 reply

Name: '#1137 leigha' => '#1137 editing or creating a page in plone 2.1 breaks except in the site root folder' Category: general-i18n => user-editing Status: open => closed

bare except clause --betabug, Wed, 03 Oct 2007 11:40:51 -0700 reply

This was fixed by adding a bare except claused. I'll change it now to catch only AttributeError?, that should fix it too.