2013-08-19 42 views
1

安裝collective.documentviewer後沒有任何問題,我上傳了文件到plone網站。我能夠正確地預覽文件的某個時候使用文檔查看器,但一段時間後,當我重新啓動服務器,並試圖訪問contailing PDF和DOC文件的文件夾,它拋出了一些回溯如下:帶plone的collective.documentviewer 4.2.1拋出錯誤

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' 

我無法查看文件夾內容。不言而喻,我無法用查看器查看文件。我曾嘗試停用並重新激活documentviewer,並創建了一個新的plone實例。但一段時間後仍然會面臨同樣的問題。任何人都可以引導嗎?

+0

在portal_view_customizations中是否存在自定義?去http:// yoursite/portal_view_customizations/manage_main – Mathias

+0

@http://stackoverflow.com/users/1716549/mat目前爲止還沒有對視圖進行定製,除非我填充了plone.footer消息正文並覆蓋了at_download代碼通過替換它沒有代碼(空白),以便它不單擊hlink時下載文件。 – user956424

+0

你安裝了哪個版本的collective.documentviewer? master中的第630行與b_size無關。 https://github.com/collective/collective.documentviewer/blob/master/collective/documentviewer/views.py#L630嘗試新版本或來源 – Mathias

回答

0

我使用了Plone 4.1.4版本,結果證明這個附加組件更穩定。它沒有給我任何錯誤。也注意到,如果你甚至嘗試自定義視圖,即/home/plone/Plone/buildout-cache/eggs/collective.documentviewer-2.2.1-py2.6.egg/collective/documentviewer/templates/documentviewer.pt,它會拋出爲'widget'添加一些錯誤,即使沒有改變任何東西