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

标签 blob plone

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

  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

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

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

谢谢

加博尔·博格达尼

最佳答案

来自版本 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.

这基本上意味着您可以:

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

关于blob - 将 Leadimage 显式转换为 Blob(迁移到 Plone4),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5246696/

相关文章:

plone - 在 Plone 4 中重新定义浏览器 View 的安全性

git - Openshift Plone 快速启动权限被拒绝

mysql - 长 Blob innodb 或 MyISAM

javascript - URL.createObjectURL 返回一个带有 null 前缀的 blob。例如 : Blob:null/12415-63

mysql - 使用 GoLang 从 MySql 数据库将图像 (blob/jpeg) 转换为 html

azure - Blob 存储 403 未经授权

plone - 在 Diazo 中使用什么代替 HTTP_X_XDV?

javascript - cordova windows 8应用程序blob url到ms-appdata url

plone - 使用wrap_form显示表单时如何隐藏edit_bar?

plone - 根据 cookie 切换 diazo (plone.app.theming) 主题