将 Leadimage 显式转换为 Blob(迁移到 Plone4)

发布于 2024-10-21 01:40:30 字数 2380 浏览 4 评论 0原文

测试大型站点从 Plone 3.3 到 Plone 4 的迁移导致丢失 Leadimage(使用 Collective.contentleadimage 创建的)。没有显示任何引导图像,并且对于文件夹引导图像视图,会发生以下错误:

  Module Products.PageTemplates.Expressions, line 220, in evaluateStructure
  Module zope.tales.tales, line 696, in evaluate
   - URL: /opt/Plone4/buildout-cache/eggs/collective.contentleadimage-1.3.0-py2.6.egg/collective/contentleadimage/browser/folder_leadimage_view.pt
   - Line 82, Column 24
   - Expression: <PythonExpr (view.tag(item_object, css_class='tileImage'))>
   - Names:
      {'args': (),
       'container': <ATTopic at /portalok/lutheran/aktualis/aktualis>,
       'context': <ATTopic at /portalok/lutheran/aktualis/aktualis>,
       'default': <object object at 0x7f93e6c4bae0>,
       'here': <ATTopic at /portalok/lutheran/aktualis/aktualis>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0xba65310>,
       'request': <HTTPRequest, URL=http://www.lutheran.hu:9080/portalok/lutheran/aktualis/aktualis/folder_leadimage_view>,
       'root': <Application at >,
       'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x5f3a810>,
       'traverse_subpath': [],
       'user': <SpecialUser 'Anonymous User'>,
       'view': <Products.Five.metaclass.SimpleViewClass from /opt/Plone4/buildout-cache/eggs/collective.contentleadimage-1.3.0-py2.6.egg/collective/contentleadimage/browser/folder_leadimage_view.pt object at 0xb3f49d0>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0xb255810>}
  Module zope.tales.pythonexpr, line 59, in __call__
   - __traceback_info__: (view.tag(item_object, css_class='tileImage'))
  Module <string>, line 1, in <module>
  Module collective.contentleadimage.browser.folder_leadimage_view, line 30, in tag
  Module Products.Archetypes.Field, line 2558, in tag
  Module plone.app.blob.mixins, line 35, in getScale
  Module plone.app.imaging.traverse, line 52, in getScale
  Module plone.app.imaging.traverse, line 84, in createScale
  Module plone.app.blob.field, line 291, in getFilename
AttributeError: getFilename

我假设引导图像尚未迁移到 blob。在 Plone4 迁移日志中,没有有关 Leadimage 迁移的行。

有没有办法将 Leadimage 显式迁移到 Blob?

谢谢,

加博尔·博格丹尼

Testing the migration from Plone 3.3 to Plone 4 for a large site resulted in lost leadimages (which have been created with collective.contentleadimage). None of the leadimages are shown and for folder leadimage views the following error occures:

  Module Products.PageTemplates.Expressions, line 220, in evaluateStructure
  Module zope.tales.tales, line 696, in evaluate
   - URL: /opt/Plone4/buildout-cache/eggs/collective.contentleadimage-1.3.0-py2.6.egg/collective/contentleadimage/browser/folder_leadimage_view.pt
   - Line 82, Column 24
   - Expression: <PythonExpr (view.tag(item_object, css_class='tileImage'))>
   - Names:
      {'args': (),
       'container': <ATTopic at /portalok/lutheran/aktualis/aktualis>,
       'context': <ATTopic at /portalok/lutheran/aktualis/aktualis>,
       'default': <object object at 0x7f93e6c4bae0>,
       'here': <ATTopic at /portalok/lutheran/aktualis/aktualis>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0xba65310>,
       'request': <HTTPRequest, URL=http://www.lutheran.hu:9080/portalok/lutheran/aktualis/aktualis/folder_leadimage_view>,
       'root': <Application at >,
       'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x5f3a810>,
       'traverse_subpath': [],
       'user': <SpecialUser 'Anonymous User'>,
       'view': <Products.Five.metaclass.SimpleViewClass from /opt/Plone4/buildout-cache/eggs/collective.contentleadimage-1.3.0-py2.6.egg/collective/contentleadimage/browser/folder_leadimage_view.pt object at 0xb3f49d0>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0xb255810>}
  Module zope.tales.pythonexpr, line 59, in __call__
   - __traceback_info__: (view.tag(item_object, css_class='tileImage'))
  Module <string>, line 1, in <module>
  Module collective.contentleadimage.browser.folder_leadimage_view, line 30, in tag
  Module Products.Archetypes.Field, line 2558, in tag
  Module plone.app.blob.mixins, line 35, in getScale
  Module plone.app.imaging.traverse, line 52, in getScale
  Module plone.app.imaging.traverse, line 84, in createScale
  Module plone.app.blob.field, line 291, in getFilename
AttributeError: getFilename

I assume that leadimages have not been migrated to blobs. In the Plone4 migration log there are no lines regarding leadimage migration.

Is there a way to migrate leadimages explicitly to blobs?

Thanks,

Gabor Bogdanyi

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

想念有你 2024-10-28 01:40:30

从 1.3 版本的变更日志来看:

此版本添加了 Blob 支持,这成为 PLONE4 中默认的主要图像存储。迁移到 Blob 尚未准备好!如果您要迁移到 PLONE4,请勿使用此版本。在 PLONE3 或 PLONE4 上使用它是安全的。

这基本上意味着您可以:

  • 尝试将版本固定为 1.2 并且在等待其他人解决问题时不使用 blob,或者
  • 编写迁移并将其返回。查看 plone.app.blob 迁移以了解它是如何完成的。我贡献了一个例子来做到这一点,自从 p4 发布以来还没有尝试过,所以你的里程可能会有所不同: http://svn.plone.org/svn/collective/example.blobattype

From the changelog for version 1.3:

THIS VERSION ADDS BLOB SUPPORT WHICH BECOMES DEFAULT LEAD IMAGE STORAGE IN PLONE4. MIGRATION TO BLOB IS NOT PREPARED YET! DON'T USE THIS VERSION IF YOU ARE MIGRATING TO PLONE4. IT IS SAFE TO USE IT ON PLONE3 OR PLONE4.

This basically means that you could either:

  • try pinning the version to 1.2 and do not use blobs while waiting for someone else to address the issue or,
  • write the migration and contribute it back. Have a look into the plone.app.blob migrations to see how it's done. I had contributed an example to do that exact thing, haven't tried it out since p4 is out so your mileage may vary: http://svn.plone.org/svn/collective/example.blobattype
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文