0

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 ...

keul
  • 7,673
  • 20
  • 45
Tobias
  • 2,481
  • 3
  • 26
  • 38

1 Answers1

1

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!

Danimal
  • 1,208
  • 10
  • 21
  • I switched to `0.5-dev`, using your `[soruces]` spec, and reinstalled `quintagroup.transmogrifier`; sadly, the error persists ... – Tobias Jul 16 '15 at 14:12
  • Did you re-run buildout `bin/buildout -c develop.cfg`? That should sort it, if not, what does grep quintagroup bin/instance give you? – Danimal Jul 16 '15 at 14:21
  • My buildout scripts are named differently, but of course I rebuilt the instance. The github version is used (as I knew because the version information in the quickinstaller had changed): `.../src/quintagroup.transmogrifier`, with `url = https://github.com/collective/quintagroup.transmogrifier.git` in `.git/config`. – Tobias Jul 16 '15 at 14:48
  • My main desire is *not* to export the whole site content; this is what most people will try first, and so did I, to see whether it works. Sadly it doesnt work for me. However, I take this from your answer: There is not reason for the `<1.5` constraint anymore, thus it was removed (and release 0.5 is broken in this regard); and no, there is nothing missing, and there might be a bug. – Tobias Jul 16 '15 at 14:56
  • Yes, sorry I think I misread your qu. You had already "fixed" the pin. However I thikn most people work from a checked out q.tm these days, so my point is good, but not the whole answer. Yes 0.5 is broken IMO. – Danimal Jul 17 '15 at 09:28