[ZCM] [ZC] 1826/ 2 Resolve "manage_convertIndexes doesn't fix all
indexes"
Collector: Zope Bugs, Features,
and Patches ...
zope-coders-admin at zope.org
Sat Jul 2 04:48:53 EDT 2005
Issue #1826 Update (Resolve) "manage_convertIndexes doesn't fix all indexes"
Status Resolved, Catalog/bug+solution medium
To followup, visit:
http://www.zope.org/Collectors/Zope/1826
==============================================================
= Resolve - Entry #2 by ajung on Jul 2, 2005 4:48 am
Status: Pending => Resolved
Fixed on the svn trunk and 2.8 branch.
________________________________________
= Request - Entry #1 by eikenberry on Jun 29, 2005 2:48 pm
After upgrading from 2.6.4 to 2.8.0 and following the instructions to update the catalogs via manage_convertIndexes, PathIndexes are still broken.
Below is the traceback I get when I hit the "Indexes" tab on the catalog after having run manage_convertIndexes.
Error Type: AttributeError
Error Value: _length
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 Shared.DC.Scripts.Bindings, line 311, in __call__
* Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
* Module App.special_dtml, line 175, in _exec
* Module DocumentTemplate.DT_With, line 76, in render
* Module DocumentTemplate.DT_In, line 703, in renderwob
* Module DocumentTemplate.DT_With, line 76, in render
* Module DocumentTemplate.DT_Var, line 214, in render
* Module Products.PluginIndexes.PathIndex.PathIndex, line 206, in indexSize
* Module Products.PluginIndexes.PathIndex.PathIndex, line 209, in __len__
AttributeError: _length
Here is a patch (diff -u) which fixes the issue.
--- ZCatalog-orig.py 2005-06-29 14:45:10.000000000 -0400
+++ ZCatalog.py 2005-06-29 14:45:01.000000000 -0400
@@ -924,12 +924,16 @@
LOG.info('Start migration of indexes for %s' % self.absolute_url(1))
for idx in self.Indexes.objectValues():
+ _class = str(idx.__class__)
bases = [str(name) for name in idx.__class__.__bases__]
found = False
for base in bases:
if 'UnIndex' in base:
found = True
break
+ else:
+ if 'PathIndex' in _class:
+ found = True
if found:
idx_type = idx.meta_type
==============================================================
More information about the Zope-Collector-Monitor
mailing list