2012-04-28 54 views
4

這是一個普遍的問題,但有一個例子。一般問題是:如何從未使用的附件清理Pl​​one站點?您可以通過多種方式生成未使用的附加組件,例如,如果您爲一件事使用一個附加組件,而後來又選擇另一組件。如何從Plone網站清理未使用的加載項?

我開始學習Plone,也許我犯了一些錯誤。但我認爲一些附加組件可能會造成問題,因爲它們會留下一些不會自動卸載的內容。那麼我的問題也是關於如何從可能的插件腳印中分離數據。

所以,這就是例子:

當我開始與我的Plone安裝一個附加的命名zettwerk.ui。但後來我卸載了它。我使用Plone Web界面和構建配置刪除了附加組件。然後我得到了這個問題:每當我試圖安裝其他附加的錯誤信息出現時間:

2012-04-28 00:21:54 INFO GenericSetup.rolemap Role/permission map imported. 
2012-04-28 00:21:54 INFO GenericSetup.archetypetool Archetype tool imported. 
2012-04-28 00:21:54 INFO GenericSetup.browserlayer Browser layers imported 
2012-04-28 00:21:54 INFO GenericSetup.resourceregistry KSS registry imported. 
2012-04-28 00:21:54 ERROR GenericSetup Step zettwerk.ui.disable_sunburst_patch has an invalid import handler 
2012-04-28 00:21:54 INFO GenericSetup.rolemap Role/permission map imported. 
2012-04-28 00:21:54 INFO GenericSetup.toolset Class zettwerk.ui.tool.tool.UITool not found for tool portal_ui_tool 
2012-04-28 00:21:54 ERROR Zope.SiteErrorLog 1335586914.990.0334188015457 http://localhost:8080/Plone/portal_quickinstaller/installProducts 
Traceback (innermost last): 
    Module ZPublisher.Publish, line 126, in publish 
    Module ZPublisher.mapply, line 77, in mapply 
    Module Products.PDBDebugMode.runcall, line 70, in pdb_runcall 
    Module ZPublisher.Publish, line 46, in call_object 
    Module Products.CMFQuickInstallerTool.QuickInstallerTool, line 575, in installProducts 
    Module Products.CMFQuickInstallerTool.QuickInstallerTool, line 512, in installProduct 
    - __traceback_info__: ('plone.app.theming',) 
    Module Products.GenericSetup.tool, line 323, in runAllImportStepsFromProfile 
    - __traceback_info__: profile-plone.app.theming:default 
    Module Products.GenericSetup.tool, line 1080, in _runImportStepsFromContext 
    Module Products.GenericSetup.tool, line 994, in _doRunImportStep 
    - __traceback_info__: toolset 
    Module Products.GenericSetup.tool, line 123, in importToolset 
TypeError: 'NoneType' object is not callable 
> /home/daniel/.buildout/eggs/Products.GenericSetup-1.6.3-py2.6.egg/Products/GenericSetup/tool.py(123)importToolset() 
-> new_tool = tool_class(tool_id) 

我把zettwerk.ui回到buildout.conf然後錯誤消失。但我認爲解決方案並不乾淨。那麼,如何從構建中刪除zettwerk.ui而不會造成問題?

回答

6

這已經在GenericSetup 1.6.5中修復: http://pypi.python.org/pypi/Products.GenericSetup/1.6.5 更新到該版本(包含在Plone 4.1.4中)應該有所斬斷。 (目前最新的穩定版本是使用GenericSetup 1.6.6的Plone 4.1.5,所以我會說那個。)

說明:在安裝過程中,zettwerk.ui告訴GenericSetup它需要一個工具。這個工具然後被創建。在卸載過程中,該工具被刪除,但它仍在所需工具列表中。如果zettwerk.ui被卸載,但程序包仍在您的構建中,並且您安裝了另一個附件,則GenericSetup會查看所需工具的列表並再次創建該工具。當zettwerk.ui不可用時,這將失敗並出現上述錯誤。 GenericSetup 1.6.5只是在這種情況下打印一條警告,並繼續愉快地繼續。

我不認爲wildcard.fixpersistentutilities適用於這種情況,但我可能會誤解。出於某種原因,我迄今爲止設法避免需要該包。

+0

謝謝,更新Plone修復它。 – 2012-05-01 14:26:57

0

有兩種可能性。

首先,做備份:-)

簡單地說,如果你重新安裝zettwerk.ui產品是不一樣的版本,最初加入,請嘗試重新安裝它的人。多年來,產品移除得到了很大改善,現在有更少的產品表現出這種行爲。

如果您仍然有問題,產品wildcard.fixpersistentutilities添加到您的擴建,重新運行擴建,並導航到/@@fix-persistent-utilities您的網站,尋找該頁面引用zettwerk.ui上的任何東西。去掉它。一旦你沒有更多的參考,刪除zettwerk.ui產品。

實際上,還有第三種可能性:向zettwerk.ui添加一個修補程序來修復其卸載!

+0

我已經修復了更新Plone的問題,但很好了解有關wildcard.fixpersistentutilities的內容。 – 2012-05-01 14:31:15