So, I've been wanting to upgrade our website (
http://www.nidelven-it.no ) for a good while now. The biggest thing holding us back has been the webshop we've developed interally and sell - but that has gotten a lot of new stuff as well as fixes and clean ups, so it is about ready to go for production.
So I setup a new site from the unified installer package, worked a bit on the webshop and separating it from older, legacy python eggs and code - installed the latest hotfix and got that working.
Went into the ZMI and hit the Plone upgrade button - it went by fast and voila the site was upgraded.
However, we're now going to use LinguaPlone with the webshop and the website so that was installed too and things seem fine.
But, wherever I went in the site I got strange tracebacks like this:
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 Products.PloneHotfix20121106.python_scripts, line 63, in _patched_bindAndExec
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 113, in pt_render
- Warning: Macro expansion failed
- Warning: <type 'exceptions.AttributeError'>: Macro widgets/rich does not exist for <ATDocument at index_html>
[...]
Module Products.PageTemplates.ZRPythonExpr, line 48, in __call__
- __traceback_info__: context.widget('text', mode='view')
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 widgets/rich does not exist for <ATDocument at index_html>
as well as
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 Products.PloneHotfix20121106.python_scripts, line 63, in _patched_bindAndExec
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 113, in pt_render
- Warning: Macro expansion failed
- Warning: <type 'exceptions.AttributeError'>: base_edit
Module zope.tal.talinterpreter, line 271, in __call__
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
[...]
<Products.CMFFormController.ControllerState.ControllerState object at 0xdcd6b6c>},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0xe2fb34c>,
'request': <HTTPRequest, URL
http://orkla.nidelven-it.no:8080/shared/cop/nidelven/plone/i...'root': <Application at >,
'template': <FSControllerPageTemplate at /shared/cop/nidelven/plone/atct_edit used for /shared/cop/nidelven/plone/index_html>,
'traverse_subpath': [],
'user': <PropertiedUser 'morphex'>}
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 74, in boboAwareZopeTraverse
Module OFS.Traversable, line 317, in restrictedTraverse
Module OFS.Traversable, line 285, in unrestrictedTraverse
- __traceback_info__: ([], 'base_edit')
AttributeError: base_edit
Now, at first it was hard to get what the issue was, but when the AttributeError base_edit popped up, I got an idea of where to start.
I had a look in
plone/portal_skins/manage_propertiesForm
and found that archetypes, archetypes_kss etc. were all in the different skin configurations so I scratched my head a bit. Well, it turns out that somewhere along the way, the portal_skins/archetypes folder went missing.. So I added a Filesystem directory view in the portal_skins folder and selected the archetypes folder and now things are just fine and dandy.
So, proceeding with the upgrade. I was still getting some weird errors, and decided to do a clear and rebuild of portal_catalog. However, when I got to portal_catalog and tried to update it, various AttributeError exceptions on the attribute clear in ZCatalog were raised. I googled a bit about it and saw suggestions that it could be because of the theme (...) but figured I could copy a portal_catalog from a fresh Plone site instead and delete the one that was failing.
That worked, I now had a working, updated ZCatalog portal_catalog..
So, onwards and upwards. Or so I thought. :)
A new error was raised whenever I tried to switch between languages:
Module Products.CMFPlone.browser.ploneview, line 295, in have_portlets
Module plone.app.layout.globals.layout, line 73, in have_portlets
Module plone.portlets.manager, line 48, in visible
Module plone.portlets.manager, line 67, in portletsToShow
Module plone.portlets.manager, line 70, in allPortlets
Module plone.memoize.view, line 47, in memogetter
Module plone.portlets.manager, line 107, in _lazyLoadPortlets
Module plone.portlets.retriever, line 62, in getPortlets
Module plone.app.portlets.portletcontext, line 40, in globalPortletCategories
Module plone.app.portlets.portletcontext, line 94, in _getContentType
Module Shared.DC.Scripts.Bindings, line 193, in __getattr__
Unauthorized: You are not allowed to access 'getTypeInfo' in this context
After some headscratching and looking deep into the portletcontext code and looking that the portal_workflow , I finally figured out that the reason for the failure was that the page I wanted in a different language was in a draft state, and not published (publish would give access to the getTypeInfo method via Access Contents Information in LinguaPlone).
OK, so far so good. That's it for today, will blog later. :)