Plone upgrade 2.1.3 > 3.0.6 fails with catalog errors

70 views Asked by At

I'm upgrading an almost vanilla Plone from 2.1.3 to 3.0.6 (that's old stuff, I know). portal_migration successfully performs the migration, but then reports errors in rebuilding the catalog

End of upgrade path, migration has finished
Your ZODB and Filesystem Plone instances are now up-to-date.
Exception was thrown while cataloging
File "/home/applinet/local/intranet/plone/intranet/Products/CMFPlone/MigrationTool.py", line 262, in upgrade catalog.refreshCatalog(clear=1)
File "/home/applinet/local/intranet/plone/installation/lib/python/Products/ZCatalog/ZCatalog.py", line 281, in refreshCatalog cat.clear()
File "/home/applinet/local/intranet/plone/installation/lib/python/Products/ZCatalog/Catalog.py", line 108, in clear self.getIndex(index).clear() 

Viewing the site fails with an exception in event.log that also seems catalog related:

2017-09-05T17:33:27 ERROR Zope.SiteErrorLog 

http://stretch.fritz.box:49171/intranet/folder_listing
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 89, in pt_render
  Module zope.pagetemplate.pagetemplate, line 117, in pt_render
   - Warning: Macro expansion failed
   - Warning: exceptions.KeyError: 'kss_generic_macros'
  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 891, in do_useMacro
  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:/home/applinet/local/intranet/plone/intranet/Products/CMFPlone/skins/plone_templates/global_defines.pt
   - Line 8, Column 0
   - Expression: <PathExpr standard:u'plone_view/globalize'>
   - Names:
      {'container': <PloneSite at /intranet>,
       'context': <PloneSite at /intranet>,
       'default': <object object at 0x7ff78a528200>,
       'here': <PloneSite at /intranet>,
       'loop': {},
       'nothing': None,
       'options': {'args': ()},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x7ff76027e758>,
       'request': <HTTPRequest, URL=http://stretch.fritz.box:49171/intranet/folder_listing>,
       'root': <Application at >,
       'template': <FSPageTemplate at /intranet/folder_listing>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>}
  Module zope.tales.expressions, line 217, in __call__
  Module Products.PageTemplates.Expressions, line 161, in _eval
  Module Products.PageTemplates.Expressions, line 123, in render
  Module Products.CMFPlone.browser.ploneview, line 68, in globalize
  Module Products.CMFPlone.browser.ploneview, line 125, in _initializeData
  Module Products.CMFPlone.browser.navigation, line 182, in topLevelTabs
  Module Products.ZCatalog.Lazy, line 158, in __getitem__
  Module Products.ZCatalog.Catalog, line 127, in __getitem__
KeyError: 403495479

An attempt to update the catalog in ZMI > site > portal_catalog > Advanced also fails:

2017-09-05T18:05:03 ERROR Zope.SiteErrorLog http://stretch.fritz.box:49171/intranet/portal_catalog/manage_catalogReindex
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 Products.ZCatalog.ZCatalog, line 260, in manage_catalogReindex
  Module Products.ZCatalog.ZCatalog, line 281, in refreshCatalog
  Module Products.ZCatalog.Catalog, line 108, in clear
AttributeError: clear

Any tips or ideas as to what may be causing this?

1

There are 1 answers

1
René Pijl On

I found the problem. The list of indexes in the Plone Catalog Tool shows three indexes in broken state, because the product TextIndexNG3 was not installed.

I installed TextIndexNG3 3.2.5 and that solved it.