我正在使用 Transmorgrifier 配方将一些数据从 drupal 导入到基于 Plone 4.1 的构建中。构建基于 https://github.com/claytron/drupal-plone-transmogrifier,(主要是我将其更新为使用 plone 4.1 而不是 4.0)。导入工作正常,我成功地将数据从 drupal 站点导入到我的 plone 站点中。唯一的问题是导入的 html 中的 html 标签显示为文字标签。
如果在成功导入后,我手动转到每个项目并选择“编辑”,然后单击“保存”,则 html 会被正确解释,但这需要大量的编辑和保存才能解决我的问题。
查看新导入的内容的屏幕截图,其中显示了 html 标签。
实际导入字段的蓝图(我相信)如下所示:
[text_mimetype]
blueprint = collective.transmogrifier.sections.inserter
key = string:_text_mimetype
value = string:text/html
我尝试使用蓝图中的 text/structed 而不是 text/html ,但这给出了相同的结果:
我需要的是导致 html 被解释的附加蓝图,或者关于如何确保我的 html 在导入时得到解释的提示。
我的管道中使用的蓝图的完整列表如下所示:
https: //github.com/claytron/drupal-plone-transmogrifier/blob/master/src/my.migration/my/migration/config/base.cfg
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.
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
发布评论
评论(3)
使用 wsapi4plone.core 迁移内容时遇到了同样的问题。
解决方案:将 zope.contenttype 固定到版本 3.5.5(即将发布的 4.1.1 中的默认值)
原因:PLIP #9938 - http://dev.plone.org/plone/ticket/9938。
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.
如果它在 Plone 4.0 下工作但不在 Plone 4.1 下工作,那么我猜它与 有关“将自定义输出转换从编辑器中剔除” PLIP 已合并为 Plone 4.1 的一部分。我会研究 PLIP 的变化,看看需要如何调整管道。
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.
实际上该部分仅在键“_text_mimetype”中插入值“text/html”
真正的封装在这里完成:
更多信息:http://pypi.python.org/pypi/plone.app.transmogrifier#mime-encapsulator-section
不管怎样,我已经尝试过封装 html 文本并不是严格强制的,它也适用于简单的字符串。
再见,贾科莫
Actually that section only insert a value "text/html" in the key "_text_mimetype"
The real encapsulation is done here:
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