我在安装 collective.documentviewer 后毫无问题地将文件上传到 plone 站点。我能够使用文档查看器正确预览文件一段时间,但一段时间后,当我重新启动服务器并尝试访问包含 pdf 和 doc 文件的文件夹时,它会抛出一些回溯,如下所示:
URL: /abc/demo/ofs.interfaces.ifolder-dvpdf-group-view Line 24, Column 0 Expression: <PythonExpr view.results(portal_type=file_types)> Names: {'container': <ATFolder at /abc/demo>, 'context': <ATFolder at /abc/demo>, 'default': <object object at 0xb75ec7e0>, 'here': <ATFolder at /abc/demo>, 'loop': {}, 'nothing': None, 'options': {'args': ()}, 'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0xcb2eaf4>, 'request': <HTTPRequest, URL=http://88.198.104.37:8081/abc/demo/dvpdf-group-view>, 'root': <Application at >, 'template': <TTWViewTemplate at /abc/demo/ofs.interfaces.ifolder-dvpdf-group-view>, 'user': <PloneUser 'xyz'>, 'view': <five.customerize.zpt.TTWView object at 0xc80df8c>} Module Products.PageTemplates.ZRPythonExpr, line 48, in __call__ __traceback_info__: view.results(portal_type=file_types) Module PythonExpr, line 1, in <expression> Module collective.documentviewer.views, line 613, in results Module collective.documentviewer.views, line 604, in getContents Module collective.documentviewer.views, line 630, in b_size AttributeError: 'TTWView' object has no attribute 'global_settings'
我无法查看文件夹内容。不用说,我无法使用查看器查看文件。我试过停用和重新激活文档查看器,还创建了一个新的 plone 实例。但是一段时间后面临同样的问题。请问有人可以指导吗?
最佳答案
我使用的是 Plone 4.1.4 版本,结果发现这个插件更稳定。它没有给我任何错误。还注意到,如果您甚至尝试自定义 View ,即/home/plone/Plone/buildout-cache/eggs/collective.documentviewer-2.2.1-py2.6.egg/collective/documentviewer/templates/documentviewer.pt,它会抛出为 'widget' 报错,即使那里没有任何改变
关于python - collective.documentviewer with plone 4.2.1 抛出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18308723/