2013-07-31 31 views
1

我已經在Plone 4.3.1上安裝了集合傳送帶1.5(注意:我使用1.6並得到相同的錯誤,希望這是一個迴歸錯誤或某事)。渲染collective.carousel portlet時出錯

然後,我創建一個與網站上的集合相關聯的傳送帶portlet。

當我去到包含portlet的我碰到下面的錯誤頁面:

KeyError: 'carousel-portlet-view' 

這裏的回溯:

- URL: /usr/local/share/plone/buildout-cache/eggs/collective.carousel-1.5-py2.7.egg/collective/carousel/po 
rtlets/carousel.pt                       
    - Line 44, Column 28                      
    - Expression: <PythonExpr (view.get_tile(item_object))>             
    - Names:                         
     {'args':(),                       
     'container': <Collection at /mysite/aggregator>,               
     'context': <Collection at /mysite/aggregator>,               
     'default': <object object at 0x7fb332672b40>,               
     'here': <Collection at /mysite/aggregator>,                
     'loop': {},                       
     'nothing': None,                      
     'options': {},                       
     'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x86704c8>,      
     'request': <HTTPRequest, URL=http://mysite.com/aggregator/folder_summary_view>,  
     'root': <Application at >,                    
     'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x69f4610>,   
     'traverse_subpath': [],                    
     'user': <PropertiedUser 'admin'>,                  
     'view': <collective.carousel.portlets.carousel.Renderer object at 0x8671d50>,       
     'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x86742d0>}      
    Module zope.tales.pythonexpr, line 59, in __call__               
    - __traceback_info__: (view.get_tile(item_object))               
    Module <string>, line 1, in <module>                  
    Module collective.carousel.portlets.carousel, line 177, in get_tile           
    Module OFS.Traversable, line 300, in unrestrictedTraverse             
    - __traceback_info__: ([], 'carousel-portlet-view')              
KeyError: 'carousel-portlet-view' 
+0

僅供簡單使用的情況下,有一個用於傳送帶portlet用例的替代方法https://github.com/miohtama/imageportlet –

+0

我知道這個,但是這個用例依賴於一組基於自定義敏捷的內容類型。目的是定製輪播視圖以顯示內容類型。 –

+0

如果您仍然打算解決此問題,則可能需要提供有關所做自定義的更多信息。在給定版本的香草網站上運行良好。 –

回答

1

the source code https://github.com/collective/collective.carousel/blob/master/collective/carousel/browser/configure.zcml看的名稱carousel-portelt-view註冊的意見人們可以看到這些都是特定的原型。

給出你的評論的信息,你正在使用靈巧我假設你需要爲你的敏捷內容類型註冊一個視圖。

+0

+1用於調查 –

+0

這看起來像是正確的方向。因此,我只需要使用基於原型的旋轉木馬內容或擴展產品以支持基於敏捷的內容。 –