Make quintagroup.transmogrifier work (version conflict, configuration_id) (Plone)

286 Views Asked by At

I'd like to use transmogrifier to copy a little excerpt of the one Plone 4 site to another. I followed the instructions in the quintagroup documentation, e.g. here.

I added both collective.transmogrifier and quintagroup.transmogrifier to my buildout:

[instance]
eggs +=
    Products.Marshall
    collective.transmogrifier
    quintagroup.transmogrifier

zcml +=
    collective.transmogrifier
    quintagroup.transmogrifier

However, the installed version 1.4 of collective.transmogrifier was not sufficient, since it lacks the traverse function in the utils module:

  File ".../eggs/plone.app.transmogrifier-1.3-py2.7.egg/plone/app/transmogrifier/atschemaupdater.py", line 8, in <module>
    from collective.transmogrifier.utils import traverse
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File ".../parts/instance/etc/site.zcml", line 15.2-15.55
    ZopeXMLConfigurationError: File ".../parts/instance/etc/package-includes/027-quintagroup.transmogrifier-configure.zcml", line 1.0-1.70
    ZopeXMLConfigurationError: File ".../eggs/quintagroup.transmogrifier-0.5-py2.7.egg/quintagroup/transmogrifier/configure.zcml", line 11.4-11.50
    ZopeXMLConfigurationError: File ".../eggs/plone.app.transmogrifier-1.3-py2.7.egg/plone/app/transmogrifier/configure.zcml", line 9.2-12.8
    ImportError: cannot import name traverse

I specified collective.transmogrifier = 1.5 in my versions.cfg, and then changed eggs/quintagroup.transmogrifier-0.5-py2.7.egg/EGG-INFO/requires.txt which insisted in collective.transmogrifier<1.5 (why?) to

collective.transmogrifier<=1.5

After rebuilding and restarting I was able to add the quintagroup.transmogrifier in the quickinstaller view. However, when I tried to export the site in the Generic Setup Tool, I failed miserably:

Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module Products.GenericSetup.tool, line 583, in manage_exportSelectedSteps
  Module Products.GenericSetup.tool, line 1038, in _doRunExportSteps
  Module quintagroup.transmogrifier.exportimport, line 72, in exportSiteStructure
  Module collective.transmogrifier.utils, line 118, in constructPipeline
  Module quintagroup.transmogrifier.sitewalker, line 32, in __init__
  Module collective.transmogrifier.utils, line 225, in __init__
AttributeError: Transmogrifier instance has no attribute 'configuration_id'

It didn't make a difference whether I saved the default export profile before or not.

Is there some configuration step missing, or is there some reason for the collective.transmogrifier <1.5 constraint? I'd like to see this work before taking on the task of selecting the whitelisted contents ...

1

There are 1 best solutions below

5
Danimal On

I've come across this before, but I was able to avoid using quintagroup.transmogrifier in that case.

The pin was removed in this commit in master (though it was a little more complicated than that if you check the history of setup.py).

So basically you are going to have to check out that product in your buildout:

[sources]
...
quintagroup.transmogrifier = git https://github.com/collective/quintagroup.transmogrifier.git

and rerunning buildout (probably bin/buildout -c develop.cfg) should do it, though that should be considered a short term hack rather than a long term solution if you are doing it on production. The long term solution is to build your own '0.5-tobias' egg using jarn.mkrelease or zest.releaser (more modern that mkrelease, but trickier to figure out) or raise an issue on https://github.com/collective/quintagroup.transmogrifier.git to ask someone to make an official release for you!