Raw HTML in body text after importing content using transmorgrifier
Asked Answered
A

3

5

I'm using a transmorgrifier recipe to import some data from drupal into a Plone 4.1 based buildout. The buildout is based on https://github.com/claytron/drupal-plone-transmogrifier, (mostly I updated it to use plone 4.1 instead of 4.0). The import works, I successfully imported data from a drupal site into my plone site. The only issue is that the html tags from the imported html show as the literal tags.

If, after the successful import, I manually go to each item and select 'edit' then click 'save' then the html is interpreted properly, but that would be a lot of editing and saving in order to fix my problem.

see screenshot of freshly imported content with html tags showing. html tags showing

The blueprint doing the actual import of the field is (I believe) the one shown below:

 [text_mimetype]
 blueprint = collective.transmogrifier.sections.inserter
 key = string:_text_mimetype
 value = string:text/html

I experimented with using text/structured instead of text/html in the blueprint but that gave the same result:

What I need is either an additional blueprint that causes the html to be interpreted or a hints on how to ensure that my html gets interpreted at import.

The full list of blueprints used in my pipeline are shown here: https://github.com/claytron/drupal-plone-transmogrifier/blob/master/src/my.migration/my/migration/config/base.cfg

Acaulescent answered 31/8, 2011 at 12:43 Comment(0)
W
2

If it works under Plone 4.0 but not under Plone 4.1, then I'm guessing it has to do with the "factor custom output transformations out of the editors" PLIP that was merged as a part of the Plone 4.1. I would look into the changes from that PLIP and see how the pipeline needs to be adjusted.

Whitehead answered 31/8, 2011 at 16:19 Comment(1)
Ross, It looks like the removal of the output transformations from the editors did indeed introduce this issue to transmorgrifier inserters. My workaround for now is to do the migration using Plone 4.0.7 and then upgrade to Plone 4.1 after successful migration.Acaulescent
H
3

Ran into the same problem when migrating content using wsapi4plone.core.

Solution: Pin zope.contenttype to version 3.5.5 (the default in the upcoming 4.1.1)

Cause: PLIP #9938 - http://dev.plone.org/plone/ticket/9938 as per esteele.

Hydrotherapeutics answered 1/9, 2011 at 14:28 Comment(1)
I can confirm that after pinning the right version it works on 4.1Inalterable
B
2

Actually that section only insert a value "text/html" in the key "_text_mimetype"

The real encapsulation is done here:

[mimetype_encapsulator]
data-key = text
mimetype = python:item.get('_%s_mimetype' % key)
# replace the data in-place
field = key
condition = mimetype

more info: http://pypi.python.org/pypi/plone.app.transmogrifier#mime-encapsulator-section

Anyway i've experimented that it's not strictly mandatory to encapsulate the html text, it works also with a simple string.

Bye, Giacomo

Boorish answered 31/8, 2011 at 13:23 Comment(0)
W
2

If it works under Plone 4.0 but not under Plone 4.1, then I'm guessing it has to do with the "factor custom output transformations out of the editors" PLIP that was merged as a part of the Plone 4.1. I would look into the changes from that PLIP and see how the pipeline needs to be adjusted.

Whitehead answered 31/8, 2011 at 16:19 Comment(1)
Ross, It looks like the removal of the output transformations from the editors did indeed introduce this issue to transmorgrifier inserters. My workaround for now is to do the migration using Plone 4.0.7 and then upgrade to Plone 4.1 after successful migration.Acaulescent

© 2022 - 2024 — McMap. All rights reserved.