Deactivating plone.app.toolbar and plone.app.widgets - plone

We were testing out the new plone.app.toolbar after Kim's fancy PloneEDU demo last week, and unfortunately hit some snags upon deactivating it and it's dependent product, plone.app.widgets. Here's what we've got installed on this server:
Plone 4.3
Zope 2.13.19
Python 2.7.3
Plone Toolbar 1.3.0
Plone Widgets 1.3.3
Our symptoms, after uninstalling the two products, are primarily that the green "edit bar" from normal Plone doesn't work, or is quirky.
If we leave plone.app.widgets installed, the green bar works mostly fine, except the "Add new" dropdown doesn't show up, it just kicks you to folder_factories on clicking "Add new". There are a few other weird things, but nothing drastic.
However! With both uninstalled: hitting the "edit" button on the green bar throws the following traceback error (in Firefox and Safari) —
Just wondering if these symptoms sound familiar or if they're easy to fix? If not we can probably live with the "Add new" not working, or else find a way to move everything to a new site on the server (it's a relatively small website still in development, so not urgent).
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, 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 322, in __call__
Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
Module Products.CMFCore.FSPageTemplate, line 237, in _exec
Module Products.CMFCore.FSPageTemplate, line 177, in pt_render
Module Products.PageTemplates.PageTemplate, line 79, in pt_render
Module zope.pagetemplate.pagetemplate, line 132, in pt_render
- Warning: Macro expansion failed
- Warning: <type 'exceptions.KeyError'>: 'macro'
Module zope.pagetemplate.pagetemplate, line 240, in __call__
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 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
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 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 858, in do_defineMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 946, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 858, in do_defineMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
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 852, in do_condition
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 852, in do_condition
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 821, in do_loop_tal
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 522, in do_optTag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 821, in do_loop_tal
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 867, in do_useMacro
Module zope.tales.tales, line 696, in evaluate
- URL: file:/usr/local/Plone/buildout-cache/eggs/Products.Archetypes-1.8.7-py2.7.egg/Products/Archetypes/skins/archetypes/edit_macros.pt
- Line 105, Column 20
- Expression: <PythonExpr context.widget(field.getName(), mode='edit')>
- Names:
{'container': <PloneSite at /Honey>,
'context': <Collection at /Honey/events/aggregator>,
'default': <object object at 0x14e84e0>,
'here': <Collection at /Honey/events/aggregator>,
'loop': {u'field': <Products.PageTemplates.Expressions.PathIterator object at 0x7f51812a83d0>,
u'fieldset': <Products.PageTemplates.Expressions.PathIterator object at 0x7f51810cc5d0>},
'nothing': None,
'options': {'args': (),
'state': <Products.CMFFormController.ControllerState.ControllerState object at 0x7f517c88a8d0>},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x7f51812beba8>,
'request': <HTTPRequest, URL=http://169.237.124.22:8080/Honey/events/aggregator/atct_edit>,
'root': <Application at >,
'template': <FSControllerPageTemplate at /Honey/atct_edit used for /Honey/events/aggregator>,
'traverse_subpath': [],
'user': <PloneUser 'cydoval'>}
Module Products.PageTemplates.ZRPythonExpr, line 48, in __call__
- __traceback_info__: context.widget(field.getName(), mode='edit')
Module PythonExpr, line 1, in <expression>
Module Products.Archetypes.BaseObject, line 287, in widget
Module Products.Archetypes.Renderer, line 26, in render
Module Products.Archetypes.generator.widget, line 147, in __call__
AttributeError: Macro patterns_widget does not exist for <Collection at aggregator>
Bonus! Just tried adding a brand new Plone site on the same server — the drop-downs for both the green "add new" menu and the user preferences don't work either.

You need to remove the product from your buildout--remove from buildout, re-run buildout, restart clients. It seems that some of the plone.app.widgets overrides affect plone sites even when they're not activated.
plone.app.widgets is still in development and the version you're on probably isn't very safe to install on a production site.
Look for a new release soon--there was just a sprint that fixed a lot of bugs.

Related

I keep getting error messages when I try to add a page with Plone 4.3(pastie.org/pasties/8060438/text)

I'm using Plone 4.3 on a Mac mini running Lion (OX10.7.5) and every time I try to add a page I get a very long error message (pastie.org/pasties/8060438/text). I can add images as well as add folders and collections, but I can't seem to add any pages. Thank you for
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module Products.CMFPlone.FactoryTool, line 473, in __call__
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, 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 322, in __call__
Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
Module Products.CMFCore.FSPageTemplate, line 237, in _exec
Module Products.CMFCore.FSPageTemplate, line 177, in pt_render
Module Products.PageTemplates.PageTemplate, line 79, in pt_render
Module zope.pagetemplate.pagetemplate, line 132, in pt_render
Warning: Macro expansion failed
Warning: <type 'exceptions.KeyError'>: 'macro'
Module zope.pagetemplate.pagetemplate, line 240, in __call__
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 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
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 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 858, in do_defineMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 946, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 858, in do_defineMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
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 852, in do_condition
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 852, in do_condition
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 821, in do_loop_tal
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 522, in do_optTag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 821, in do_loop_tal
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
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 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
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 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 852, in do_condition
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 852, in do_condition
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 946, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
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 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
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 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
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:/Applications/Plone/buildout-cache/eggs/Products.TinyMCE-1.3.3-py2.7.egg/Products/TinyMCE/skins/tinymce/tinymce_wysiwyg_support.pt
Line 6, Column 2
Expression: <PythonExpr configuration_method(field=field)>
Names:
{'container': <PloneSite at /CMLIT010>,
'context': <ATDocument at /CMLIT010/chapter-12-files/portal_factory/Document/document.2013-06-19.0191801348 used for /CMLIT010/chapter-12-files>,
'default': <object object at 0x10a0ceb30>,
'here': <ATDocument at /CMLIT010/chapter-12-files/portal_factory/Document/document.2013-06-19.0191801348 used for /CMLIT010/chapter-12-files>,
'loop': {u'field': <Products.PageTemplates.Expressions.PathIterator object at 0x10f852f10>,
u'fieldset': <Products.PageTemplates.Expressions.PathIterator object at 0x10f9f6cd0>},
'nothing': None,
'options': {'args': (),
'state': <Products.CMFFormController.ControllerState.ControllerState object at 0x10f29e210>},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x10f9b7f70>,
'request': <HTTPRequest, URL=http://localhost:8080/CMLIT010/chapter-12-files/portal_factory/Document/document.2013-06-19.0191801348/atct_edit>,
'root': <Application at >,
'template': <FSControllerPageTemplate at /CMLIT010/atct_edit used for /CMLIT010/chapter-12-files/portal_factory/Document/document.2013-06-19.0191801348>,
'traverse_subpath': [],
'user': <PropertiedUser 'admin'>}
Module Products.PageTemplates.ZRPythonExpr, line 48, in __call__
__traceback_info__: configuration_method(field=field)
Module PythonExpr, line 1, in <expression>
Module Products.TinyMCE.browser.browser, line 127, in jsonConfiguration
Module Products.TinyMCE.utility, line 951, in getConfiguration
AttributeError: thumbnail_size
I had the same error installing a basic 4.3.1 site. The installer couldn't grab a couple of packages during the install (mostly timeouts). fired-up the instance, created a Plone site, and then got the same error.
Ultimately, I blew away everything that was built in eggs ( rm -r ../buildout-cache/eggs/* ) and other things like .installed and the .mr.developer stuff in my buildout root. Then, 'python bootstrap.py' again and re-run the buildout. This has happened often enough that I have a shell script to wipe everything clean. I'm sure there's a better way (tests?) But, it works for me.

Omit site site in returned result when using getPath in Plone page templates

I have a piece of TALES for a page template in Plone which looks through the results of a collection and inserts them into a box (similar to that of a collection portlet)
I have an issue in getting a URL from the returned items, I have been using getPath however it returns the site name, so my URLS end up being http://mysite.com/ThePloneSite/folder/page instead of just http://mysite.com/folder/page, currently my example TALES is as follows:
<a tal:attributes="href string:${item/getPath}/view">Item</a>
I have tried every variation I can imagine but I can't remember them all so here's a couple that don't work:
(this returns nothing)
<a tal:attributes="href item/absolute_url">Item</a>
this gives me a traceback, complaining about "getpath":
<a tal:attributes="python:item.getObject().absolute_url()">Item</a>
The only reason the site name being in the link is annoying is that in order to access the "State" and "Display" buttons you must click "View" after originally clicking on the link
NOTE: the last example works when you're using getFolderContents however I understand returning results from a collection are different.
Any help would be greatly appreciated, thanks.
EDIT Traceback for absolute version:
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module Shared.DC.Scripts.Bindings, line 322, in __call__
Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
Module Products.PageTemplates.ZopePageTemplate, line 334, in _exec
Module Products.PageTemplates.ZopePageTemplate, line 431, in pt_render
Module Products.PageTemplates.PageTemplate, line 79, in pt_render
Module zope.pagetemplate.pagetemplate, line 113, in pt_render
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 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 852, in do_condition
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 852, in do_condition
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 946, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 821, in do_loop_tal
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 405, in do_startTag
Module zope.tal.talinterpreter, line 482, in attrAction_tal
Module Products.PageTemplates.Expressions, line 225, in evaluateText
Module zope.tales.tales, line 696, in evaluate
- URL: /peacehospice/portal_skins/custom/home_page_view
- Line 200, Column 12
- Expression: <PythonExpr alldoc.getObject().absolute_url()>
- Names:
{'container': <PloneSite at /peacehospice>,
'context': <ATDocument at /peacehospice/front-page>,
'default': <object object at 0x7fbed9313b30>,
'here': <ATDocument at /peacehospice/front-page>,
'loop': {u'alldoc': <Products.PageTemplates.Expressions.PathIterator object at 0x7fbebcd20c50>},
'nothing': None,
'options': {'args': ()},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x7fbebde89680>,
'request': <HTTPRequest, URL=http://demo.kcsts.co.uk/front-page/home_page_view>,
'root': <Application at >,
'template': <ZopePageTemplate at /peacehospice/home_page_view used for /peacehospice/front-page>,
'traverse_subpath': [],
'user': <PropertiedUser 'dan'>}
Module Products.PageTemplates.ZRPythonExpr, line 48, in __call__
- __traceback_info__: alldoc.getObject().absolute_url()
Module PythonExpr, line 1, in <expression>
Module AccessControl.ImplPython, line 716, in guarded_getattr
Module AccessControl.ImplPython, line 658, in aq_validate
Module AccessControl.ImplPython, line 552, in validate
Module AccessControl.ImplPython, line 322, in validate
Module AccessControl.ImplPython, line 749, in raiseVerbose
Module AccessControl.ImplPython, line 726, in item_repr
Module plone.app.contentlisting.catalog, line 29, in __repr__
Module plone.app.contentlisting.catalog, line 74, in getPath
Module Products.ZCatalog.CatalogBrains, line 51, in getPath
AttributeError: getpath
TALES for getting content of collection:
<div id="all-documents" tal:define="allDocsBatch python:context.documents.alldocuments.results(b_start=b_start,b_size=10)">
<h3>All Documents</h3>
<div class="tabbedWrapper">
<div class="item" tal:repeat="alldoc allDocsBatch">
<p>
<img tal:replace="structure alldoc/getIcon" />
<a tal:attributes="href python:alldoc.getObject().absolute_url()" tal:content="alldoc/Title" />
<span class="tags" tal:condition="alldoc/Subject" tal:define="alldoctag alldoc/Subject">
<a tal:repeat="tag alldoctag" tal:content="tag"
tal:attributes="href string:${context/portal_url}/##search?Subject:list=${tag}"/>
</span>
</p>
</div>
</div>
</div>
EDIT #2
NOTE found a link http://copilotco.com/mail-archives/plone-users.2007/msg05113.html which may help but haven't had a chance to look at it just yet.
If item is a catalog brain (as in your example) you need to call item/getURL. absolute_url is for real objects.

collective.data.examples custom field wont save data

This is a continuation from this question.
I have used collective.examples.userdata
and successfully added a 'Position' text field to my User registration form. My problem is that when I go to my /##personal-information page, fill in the field and hit 'Save', it just shows the field again and it is blank. I don't appear to be able to save any information to this field. I have tried running my instance in foreground mode but I can't see anything outputted to it when trying to save new information.
I don't know if this'll help but when I try to make use of the following TALES statement:
tal:define="membership context/portal_membership;
info python:membership.getMemberInfo(user.getId());"
and then:
tal:replace="info/position"
I get the following traceback:
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module Shared.DC.Scripts.Bindings, line 322, in __call__
Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
Module Products.PageTemplates.ZopePageTemplate, line 334, in _exec
Module Products.PageTemplates.ZopePageTemplate, line 431, in pt_render
Module Products.PageTemplates.PageTemplate, line 79, in pt_render
Module zope.pagetemplate.pagetemplate, line 113, in pt_render
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 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 858, in do_defineMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 946, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 858, in do_defineMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 620, in do_insertText_tal
Module Products.PageTemplates.Expressions, line 225, in evaluateText
Module zope.tales.tales, line 696, in evaluate
- URL: /mysite/portal_skins/custom/home_page_view
- Line 32, Column 11
- Expression: <PathExpr standard:u'info/position'>
- Names:
{'container': <PloneSite at /mysite>,
'context': <ATDocument at /mysite/front-page>,
'default': <object object at 0x7f1c681eeb30>,
'here': <ATDocument at /mysite/front-page>,
'loop': {},
'nothing': None,
'options': {'args': ()},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x9540260>,
'request': <HTTPRequest, URL=http://dan-apache:8080/mysite/front-page/home_page_view>,
'root': <Application at >,
'template': <ZopePageTemplate at /mysite/home_page_view used for /mysite/front-page>,
'traverse_subpath': [],
'user': <PropertiedUser 'dan'>}
Module zope.tales.expressions, line 217, in __call__
Module Products.PageTemplates.Expressions, line 147, in _eval
Module zope.tales.expressions, line 124, in _eval
Module Products.PageTemplates.Expressions, line 77, in boboAwareZopeTraverse
Module zope.traversing.adapters, line 136, in traversePathElement
- __traceback_info__: ({'language': '', 'description': '', 'username': 'dan', 'has_email': False, 'location': '', 'fullname': '', 'home_page': ''}, 'position')
Module zope.traversing.adapters, line 50, in traverse
- __traceback_info__: ({'language': '', 'description': '', 'username': 'dan', 'has_email': False, 'location': '', 'fullname': '', 'home_page': ''}, 'position', [])
LocationError: ({'language': '', 'description': '', 'username': 'dan', 'has_email': False, 'location': '', 'fullname': '', 'home_page': ''}, 'position')
Any thoughts would be greatly appreciated!
Okay FYI anyone else experiencing this, I went into the ZMI, went into portal_memberdata and then added some text to the Position field that had been created by my add-on.. Upon clicking save I could see the information in the /##personal-information form, I am now able to update it on a per-user basis.

Plone 3.3.5 Document_view attribute error

Plone n00b here, continuing migration issues from 2.5 to 3.3.5.
To eliminate any potential problems I cleared out the custom folder and tried to get the pages to show up. When I go to a page that isn't the front page I get an:
AttributeError _v_transform.
Here is the traceback:
Exception traceback
Time 2012/09/13 08:18:06.733 GMT-7
User Name (User Id) Anonymous User (None)
Request URL http://localhost:8080/mission-vision/index_html/document_view
Exception Type AttributeError
Exception Value _v_transform
Traceback (innermost last):
Module ZPublisher.Publish, line 119, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 42, in call_object
Module Shared.DC.Scripts.Bindings, line 313, in __call__
Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
Module Products.CMFCore.FSPageTemplate, line 216, in _exec
Module Products.CMFCore.FSPageTemplate, line 155, in pt_render
Module Products.PageTemplates.PageTemplate, line 98, in pt_render
Module zope.pagetemplate.pagetemplate, line 117, in pt_render
Module zope.tal.talinterpreter, line 271, in __call__
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 891, in do_useMacro
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 536, in do_optTag_tal
Module zope.tal.talinterpreter, line 521, in do_optTag
Module zope.tal.talinterpreter, line 516, in no_tag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 957, in do_defineSlot
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 536, in do_optTag_tal
Module zope.tal.talinterpreter, line 521, in do_optTag
Module zope.tal.talinterpreter, line 516, in no_tag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 861, in do_defineMacro
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 957, in do_defineSlot
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 536, in do_optTag_tal
Module zope.tal.talinterpreter, line 521, in do_optTag
Module zope.tal.talinterpreter, line 516, in no_tag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 949, in do_defineSlot
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 536, in do_optTag_tal
Module zope.tal.talinterpreter, line 521, in do_optTag
Module zope.tal.talinterpreter, line 516, in no_tag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 861, in do_defineMacro
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 586, in do_setLocal_tal
Module zope.tales.tales, line 696, in evaluate
URL: file:d:\websites\nipo\plone 3.3.5\buildout-cache\eggs\plone-3.3.5-py2.4.egg\Products\CMFPlone\skins\plone_content\document_view.pt
Line 11, Column 4
Expression: <PathExpr standard:u'here/getText'>
Names:
{'container': <PloneSite at /Plone>,
'context': <ATDocument at /Plone/mission-vision/index_html>,
'default': <object object at 0x0108D528>,
'here': <ATDocument at /Plone/mission-vision/index_html>,
'loop': {},
'nothing': None,
'options': {'args': ()},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x07909300>,
'request': <HTTPRequest, URL=http://localhost:8080/mission-vision/index_html/document_view>,
'root': <Application at >,
'template': <FSPageTemplate at /Plone/document_view used for /Plone/mission-vision/index_html>,
'traverse_subpath': [],
'user': <SpecialUser 'Anonymous User'>}
Module zope.tales.expressions, line 217, in __call__
Module Products.PageTemplates.Expressions, line 163, in _eval
Module Products.PageTemplates.Expressions, line 125, in render
Module Products.Archetypes.ClassGen, line 56, in generatedAccessor
Module wicked.fieldevent, line 29, in render
Module zope.event, line 23, in notify
Module zope.component.event, line 26, in dispatch
Module zope.component._api, line 130, in subscribers
Module zope.component.registry, line 290, in subscribers
Module zope.interface.adapter, line 535, in subscribers
Module wicked.fieldevent, line 16, in notifyFieldEvent
Module zope.component._api, line 101, in getMultiAdapter
Module zope.component._api, line 114, in queryMultiAdapter
Module zope.component.registry, line 206, in queryMultiAdapter
Module zope.interface.adapter, line 482, in queryMultiAdapter
Module wicked.fieldevent.meta, line 78, in field_value
Module Products.Archetypes.Field, line 1394, in get
Module Products.Archetypes.BaseUnit, line 100, in transform
Module Products.PortalTransforms.TransformEngine, line 181, in convertTo
Module Products.PortalTransforms.chain, line 51, in convert
Module Products.PortalTransforms.Transform, line 192, in convert
AttributeError: _v_transform
Thanks in advance!
Try this: go to portal_setup, click import tab, select 'Portal Transforms' profile, checkbox 'PloneTransforms setup', hit 'Import selected steps', take care that 'Include dependencies' is checked, too.
References: http://plone.293351.n2.nabble.com/Re-content-type-icons-missing-in-migrated-site-td2563285.html

After a Plone 2.5x to Plone 3.x migration, how do I correct the kss_generic_macros problem?

I get the error below on several views. Which seems identical to what is described here in this other kss_generic_macros post. An answer is supplied, which is "This was caused by the 2.5->3.0 migration process failing to add the plone_kss layer to a handful of our custom skins. When I went in and added plone_kss by hand to those skins, it fixed this."
This is only so helpful. A code sample or a real pointer as to where you add plone_kss would make this much easier to solve.
2009-06-24 15:24:28 ERROR Zope.SiteErrorLog 1245871468.060.103936823493 https://nasascience.on.my.mac/humanator-folder/what-is-six-plus-3/base_view
Traceback (innermost last):
Module ZPublisher.Publish, line 119, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 42, in call_object
Module Shared.DC.Scripts.Bindings, line 313, in __call__
Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
Module Products.CMFCore.FSPageTemplate, line 216, in _exec
Module Products.CacheSetup.patch_cmf, line 29, in FSPT_pt_render
Module Products.CacheSetup.patch_utils, line 9, in call_pattern
Module Products.CMFCore.FSPageTemplate, line 155, in pt_render
Module Products.CacheSetup.patch_cmf, line 77, in PT_pt_render
Module Products.CacheSetup.patch_utils, line 9, in call_pattern
Module Products.PageTemplates.PageTemplate, line 98, in pt_render
Module zope.pagetemplate.pagetemplate, line 117, in pt_render
- Warning: Macro expansion failed
- Warning: exceptions.KeyError: 'macro'
Module zope.tal.talinterpreter, line 271, in __call__
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 891, in do_useMacro
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 536, in do_optTag_tal
Module zope.tal.talinterpreter, line 521, in do_optTag
Module zope.tal.talinterpreter, line 516, in no_tag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 536, in do_optTag_tal
Module zope.tal.talinterpreter, line 525, in do_optTag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 957, in do_defineSlot
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 536, in do_optTag_tal
Module zope.tal.talinterpreter, line 521, in do_optTag
Module zope.tal.talinterpreter, line 516, in no_tag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 861, in do_defineMacro
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 957, in do_defineSlot
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 536, in do_optTag_tal
Module zope.tal.talinterpreter, line 521, in do_optTag
Module zope.tal.talinterpreter, line 516, in no_tag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 536, in do_optTag_tal
Module zope.tal.talinterpreter, line 525, in do_optTag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 949, in do_defineSlot
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 536, in do_optTag_tal
Module zope.tal.talinterpreter, line 521, in do_optTag
Module zope.tal.talinterpreter, line 516, in no_tag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 861, in do_defineMacro
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 536, in do_optTag_tal
Module zope.tal.talinterpreter, line 521, in do_optTag
Module zope.tal.talinterpreter, line 516, in no_tag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 891, in do_useMacro
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 536, in do_optTag_tal
Module zope.tal.talinterpreter, line 521, in do_optTag
Module zope.tal.talinterpreter, line 516, in no_tag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 870, in do_useMacro
Module zope.tales.tales, line 696, in evaluate
- URL: file:/Users/danny/projects/schwa/2.1.0a/trunk/eggs/Products.Archetypes-1.5.10-py2.4.egg/Products/Archetypes/skins/archetypes/base.pt
- Line 22, Column 10
- Expression: <PathExpr standard:u'here/kss_generic_macros/macros/generic_title_view'>
- Names:
{'container': <PloneSite at /msrd>,
'context': <Humanatorquestion at /msrd/humanator-folder/what-is-six-plus-3>,
'default': <object object at 0x1bf528>,
'here': <Humanatorquestion at /msrd/humanator-folder/what-is-six-plus-3>,
'loop': {},
'nothing': None,
'options': {'args': ()},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x9ea75f8>,
'request': <HTTPRequest, URL=https://nasascience.on.my.mac/humanator-folder/what-is-six-plus-3/base_view>,
'root': <Application at >,
'template': <FSPageTemplate at /msrd/base_view used for /msrd/humanator-folder/what-is-six-plus-3>,
'traverse_subpath': [],
'user': <PloneUser 'admin'>}
Module zope.tales.expressions, line 217, in __call__
Module Products.PageTemplates.Expressions, line 155, in _eval
Module zope.tales.expressions, line 124, in _eval
Module Products.PageTemplates.Expressions, line 82, in boboAwareZopeTraverse
Module OFS.Traversable, line 301, in restrictedTraverse
Module OFS.Traversable, line 269, in unrestrictedTraverse
- __traceback_info__: ([], 'kss_generic_macros')
AttributeError: kss_generic_macros
Log into the ZMI then go to the portal_skins tool. Now click on the "properties" tab. The "Plone Default" skin should look something like this:
custom
cmfeditions_views
CMFEditions
ChangeSet
kupu_plone
kupu
kupu_tests
archetypes
archetypes_kss
mimetypes_icons
plone_kss
ATContentTypes
ATReferenceBrowserWidget
ResourceRegistries
PasswordReset
gruf
plone_ecmascript
plone_wysiwyg
plone_prefs
plone_portlets
plone_templates
plone_styles
plone_form_scripts
plone_scripts
plone_forms
plone_images
plone_content
plone_login
plone_deprecated
plone_3rdParty
cmf_legacy
If you are missing any of those you'll need to add them in. That should solve the issue.
You are missing the plone_kss layer in your skins. Go to the ZMI (via site setup or by adding /manage to your Plone homepage), find the portal_skins tool, and check your skin layers in the properties tab. Make sure the plone_kss layer is listed before the custom layer and you should be set to go.
In future, you can use a command line tool like find to locate missing skin methods; I found this one in a buildout by using the following command:
$ find parts/plone -name kss_generic_macros.*
parts/plone/CMFPlone/skins/plone_kss/kss_generic_macros.pt
You can automate this with the following Python Script:
from Products.CMFCore.utils import getToolByName
layer = 'plone_kss'
skins = getToolByName(context, 'portal_skins')
for name in skins.getSkinSelections():
path = skins.getSkinPath(name)
path = [i.strip() for i in path.split(',')]
if layer not in path:
try:
path.insert(path.index('custom') + 1, layer)
except ValueError:
path.append(layer)
skins.addSkinSelection(name, ','.join(path))
This script loops over all skins in the skins tool, and will insert plone_kss into any one of them where it is missing; either just after the custom layer, or at the end if there is no custom layer present.
The reason you want your custom layer to be first is that this layer by custom (no pun intended) holds customized versions of skin assets. If you were to customize an asset from the portal_kss layer through the ZMI then the customized version will be put in the custom layer. Because skin lookup rules will look through the layer stack top-to-bottom, you want to make sure your customized versions in the custom layer are found before the originals in the lower layers.

Resources