1

我从https://github.com/aclark4life/wordpress2plone/的配置文件中借鉴了一些想法来扩展我的 Plone 4.3 构建。

目的是使从 wordpress 站点导出的数据导入我的 Plone 站点成为可能。导出的格式是 Wordpress eXtended RSS (wxr)。

当我运行以下迁移命令时,

bin/迁移 --pipeline=pipeline.cfg

我收到以下错误:

AttributeError:上下文实例没有属性“getPhysicalPath”

这是完整的追溯:

Traceback (most recent call last):
  File "bin/migrate", line 293, in <module>
    sys.exit(mr.migrator.runner.runner())
  File "/home/zope/Plone/buildout-cache/eggs/mr.migrator-1.0.1-py2.7.egg/mr/migrator/runner/__init__.py", line 132, in runner
    transmogrifier(pipelineid, **overrides)
  File "/home/zope/Plone/buildout-cache/eggs/collective.transmogrifier-1.4-py2.7.egg/collective/transmogrifier/transmogrifier.py", line 59, in __call__
    pipeline = constructPipeline(self, sections)
  File "/home/zope/Plone/buildout-cache/eggs/collective.transmogrifier-1.4-py2.7.egg/collective/transmogrifier/utils.py", line 56, in constructPipeline
    pipeline)
  File "/home/zope/Plone/buildout-cache/eggs/collective.transmogrifier-1.4-py2.7.egg/collective/transmogrifier/sections/splitter.py", line 132, in __init__
    pipeline = constructPipeline(transmogrifier, sections, condition)
  File "/home/zope/Plone/buildout-cache/eggs/collective.transmogrifier-1.4-py2.7.egg/collective/transmogrifier/utils.py", line 56, in constructPipeline
    pipeline)
  File "/home/zope/Plone/side/src/transmogrify.wordpress/transmogrify/wordpress/blueprints.py", line 300, in __init__
    self.site_path = '/'.join(transmogrifier.context.getPhysicalPath())
AttributeError: Context instance has no attribute 'getPhysicalPath'

我的预感是它没有找到我的 Plone 实例,我想知道是否有一些我没有声明关于我的 Plone 站点位置的内容,似乎由于某种原因 transmogrifier.context 没有设置为我的 Plone 站点.

为了进一步参考,我的 pipeline.cfg 文件中的选项如下所示:

[options]

#Full path to the Wordpress WXR export file.
filename = /home/zope/Plone/side/myblog.wordpress.2013-06-29.xml

#Path, relative to the site root, of the folder where blog entries
#should be created.
#path = blog
path = Plone

#The desired portal_type for blog entries.  Must be something with
#a 'text' field, and must already exist in the site.  The default,
#'Blog Entry', may be obtained by installing Scrawl.
#type = Blog Entry
type = Page

#A CSS selector to find the body of a post within its full HTML page.
entry-selector = div.entry
4

1 回答 1

0

假设“Plone”是您的 Plonesite 的 ID,请将路径更改为/Plone.

于 2013-07-15T07:00:29.153 回答