#15 — Subtyping a folder to a Child Site broken with plone.app.folder>1.0b3

by Harald Friessnegger last modified Apr 30, 2010 11:47 AM
State Tested and confirmed closed
Version:
Area Functionality
Issue type Bug
Severity Medium
Submitted by Harald Friessnegger
Submitted on Mar 17, 2010
Responsible Thomas Besluau
Target release:
using collective.lineage trunk in a plone4.0b1 buildout does not work (used to work for plone4.0a5 though)

when following the steps outlined below you'll get the following error immediately after subtyping and each time you try to change the subsite or an object within it:

AttributeError: Attempt to set attribute on empty acquisition wrapper
> /home/frisi/.buildout/eggs/ZODB3-3.9.4-py2.6-linux-i686.egg/ZODB/serialize.py(514)load_persistent()
-> obj._p_oid = oid

i found out that the reason is a change in plone.app.folder (http://dev.plone.org/plone/changeset/34308)

pinning the version to 1.0b3 is a temporary workaround.

we should find out if this breaks p4a.subtyper in general and if lineage, subtyper or plone.app.folder needs to be changed to make things work again
Steps to reproduce:
create plonesite and install lineage
create a folder
set the "child site" subtype on the folder
Added by Harald Friessnegger on Mar 17, 2010 02:55 PM
update: pinning plone.app.folder makes subtyping work, however we still get the above AttributeError when
a) editing the childsite ttw
b) adding content ttw

however adding a folder using pdbdebugmode works:

http://myhost/plone/childsite/pdb
>>> self.context.invokeFactory('Folder', 'subfolder')
>>> self.context.subfolder.reindexObject()
>>> import transaction; transaction.commit()

the folder is listed in subsite/folder_contents.
editing the new folder ttw results in the above error again after pressing save
Added by Harald Friessnegger on Mar 17, 2010 03:16 PM
asked on #plone and got a pointer to http://dev.plone.org/plone/ticket/10318.
the issues seem related. the workaround there also helps to get rid of this problem
Added by Thomas Besluau on Apr 15, 2010 07:05 PM
Issue state: UnconfirmedConfirmed
Steps to reproduce:
1- Create a Plone4 buildout, with a Plone4 site
2- Get the trunk of lineage (0.2dev) in src and install it
3- Create a folder, make it a child folder
4- edit this child folder

Error paste: http://pastie.org/921760

Note: check #16 when solved, potential duplicate
Added by Thomas Besluau on Apr 15, 2010 07:18 PM
Paste:
2010-04-15 15:06:46 ERROR Zope.SiteErrorLog 1271358406.670.210609386418 http://localhost:51000/Plone/test/atct_edit
Traceback (innermost last):
  Module ZPublisher.Publish, line 127, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module Products.PDBDebugMode.runcall, line 70, in pdb_runcall
  Module ZPublisher.Publish, line 47, in call_object
  Module Products.CMFFormController.FSControllerPageTemplate, line 91, in __call__
  Module Products.CMFFormController.BaseControllerPageTemplate, line 31, in _call
  Module Shared.DC.Scripts.Bindings, line 324, in __call__
  Module Shared.DC.Scripts.Bindings, line 361, in _bindAndExec
  Module Products.CMFCore.FSPageTemplate, line 240, in _exec
  Module Products.CMFCore.FSPageTemplate, line 180, in pt_render
  Module Products.PTProfiler.ProfilerPatch, line 83, in __patched_render__
  Module Products.PageTemplates.PageTemplate, line 80, in pt_render
  Module zope.pagetemplate.pagetemplate, line 115, in pt_render
   - Warning: Macro expansion failed
   - Warning: <type 'exceptions.KeyError'>: 'macro'
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 888, in do_useMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 583, in do_setLocal_tal
  Module zope.tales.tales, line 696, in evaluate
   - URL: file:/home/thomas/.buildout/eggs/Products.Archetypes-1.6b8-py2.6.egg/Products/Archetypes/skins/archetypes/base_edit.cpt
   - Line 1, Column 0
   - Expression: <PathExpr standard:u'lifecycle/begin_edit'>
   - Names:
      {'container': <ATFolder at /Plone/test>,
       'context': <ATFolder at /Plone/test>,
       'default': <object object at 0xb73ee6e8>,
       'here': <ATFolder at /Plone/test>,
       'loop': {},
       'nothing': None,
       'options': {'args': (),
                   'state': <Products.CMFFormController.ControllerState.ControllerState object at 0xe32dbcc>},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0xe3ac8ac>,
       'request': <HTTPRequest, URL=http://localhost:51000/Plone/test/atct_edit>,
       'root': <Application at >,
       'template': <FSControllerPageTemplate at /Plone/test/atct_edit>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>}
  Module Products.PTProfiler.ProfilerPatch, line 32, in __patched_call__
  Module zope.tales.expressions, line 217, in __call__
  Module Products.PageTemplates.Expressions, line 157, in _eval
  Module Products.PageTemplates.Expressions, line 119, in render
  Module Products.Archetypes.browser.lifecycle, line 17, in begin_edit
  Module zope.event, line 23, in notify
  Module zope.component.event, line 26, in dispatch
  Module zope.component._api, line 138, in subscribers
  Module zope.component.registry, line 323, in subscribers
  Module zope.interface.adapter, line 575, in subscribers
  Module zope.component.event, line 33, in objectEventNotify
  Module zope.component._api, line 138, in subscribers
  Module zope.component.registry, line 323, in subscribers
  Module zope.interface.adapter, line 575, in subscribers
  Module plone.locking.events, line 13, in lockOnEditBegins
  Module plone.locking.lockable, line 33, in lock
AttributeError: 'SiteControlPanelAdapter' object has no attribute 'lock_on_ttw_edit'
> /home/thomas/.buildout/eggs/plone.locking-1.2.0-py2.6.egg/plone/locking/lockable.py(33)lock()
-> if settings is not None and settings.lock_on_ttw_edit is False:
Added by Harald Friessnegger on Apr 18, 2010 06:51 PM
hi thomas. actually the issue you described in your comment is exactly what has been reported in #16.

this issue deals with another error that happened when subtyping a folder as childsite. not when editing it afterwards.

as i noticed later, this issue has been caused by some incompatibility in Acquisition and ZODB3 (see http://dev.plone.org/plone/ticket/10318) and seems not to be a lineage problem at all.

so i think we can safely close this issue.
Added by Thomas Besluau on Apr 19, 2010 01:41 PM
Issue state: ConfirmedResolved
Responsible manager: (UNASSIGNED)tbesluau
Added by Lucie Lejard on Apr 30, 2010 11:47 AM
Issue state: ResolvedTested and confirmed closed

No responses can be added.