#34 — VDEX creation fails with LinguaPlone

StateResolved
Version: 1.1
AreaFunctionality
Issue typeBug
SeverityMedium
Submitted byrsantos
Submitted onFeb 10, 2007
Responsible Jens W. Klein
Target release:
Return to tracker
Last modified on Jan 08, 2009 by Matthew Wilkes


There are 4 tests currently failing on VDEX vocabulary creation, if LinguaPlone is included in the products directory. It's also happening through-the-web:

Traceback (innermost last):
  Module ZPublisher.Publish, line 115, in publish
  Module ZPublisher.mapply, line 88, in mapply
(...)
  Module Products.Archetypes.CatalogMultiplex, line 97, in reindexObject
  Module Products.Archetypes.ExtensibleMetadata, line 462, in notifyModified
  Module Products.LinguaPlone.utils, line 87, in generatedMutator
AttributeError: getTranslations


This is happening because `config.py` is importing registerType from LinguaPlone, to check for the product existence (is there a reason to import registerType?). Module `types.vdex.vocabulary` is importing * from config, including registerType, so it uses registerType form LinguaPlone.

The following change should fix it. At least, all tests pass now.

try:
- from Products.LinguaPlone.public import registerType
+ import Products.LinguaPlone
except ImportError:
    HAS_LINGUA_PLONE = False
else:
    HAS_LINGUA_PLONE = True

note: it loks like this is related to issue #11 (http://plone.org/products/atvocabularymanager/issues/11/).
Steps to reproduce:
Create a VDEX vocabulary instance with LinguaPlone present in your zope instance.
Added byTom ElliottonMar 01, 2007 11:35 PM
Responsible manager: jensens(UNASSIGNED)
I can confirm this problem with the following setup. Will attempt suggested fix above and report results.

Plone 2.5.2, CMF-1.6.2, Zope (Zope 2.9.5-final, python 2.4.3, win32), Five 1.4.2, Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)], PIL 1.1.5, LinguaPlone 0.9.0, PloneLanguageTool 1.5., ATVM from svn trunk at r7545.

See my response posted 1 March 2007 to issue #29 for details: http://plone.org/products/atvocabularymanager/issues/29/
Added byTom ElliottonMar 02, 2007 12:10 AM
The fix recommended by rsantos works. I upload a patch here since I don't have
Added byJens W. KleinonMar 02, 2007 08:01 AM
Issue state: unconfirmedresolved
Responsible manager: (UNASSIGNED)jensens
fixed, patch applied

Add response

Please enter your response below