-
-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ComponentLookupError while migrating Plone 4.3 into Plone 5.0 #1187
Comments
I'm getting the same error but slightly different traceback when migrated old Plone 3 site to 4.3.6 even without activating Diazo theme support yet. p.a.multilingual is installed as well.
|
You need to install Diazo to get the site running in Plone 5. You can do this in portal_setup by importing the Diazo Theme Support Profile. |
In my case I don't want Diazo on this site. It is migrated Plone 4.3.6(7) site. It should work without Diazo, shouldn't it ? |
No. You need to install diazo. You can disable the theme if you want but you need diazo. |
Don't we need migration for this, installing the Diazo support always when migrating to Plone 5? I have created a clean Plone Site in coredev 4.3, copied the var directory to coredev 5.0, started it, migrated it, and got the above error when viewing the site. Alternatively, this avoids the ComponentLookupError:
|
same error over here while updating vanilla Plone 4.3.7 with one add-on installed into Plone 5.0.2. 2016-02-24 09:16:44 ERROR Zope.SiteErrorLog 1456316204.090.23818938378 http://localhost:8080/Plone/++plone++static
Traceback (innermost last):
Module ZPublisher.Publish, line 127, in publish
Module ZPublisher.BaseRequest, line 508, in traverse
Module ZPublisher.BaseRequest, line 332, in traverseName
Module zope.traversing.namespace, line 112, in namespaceLookup
Module Products.CMFPlone.traversal, line 30, in traverse
Module zope.component._api, line 169, in getUtility
ComponentLookupError: (<InterfaceClass plone.resource.interfaces.IResourceDirectory>, 'persistent') @pbauer's workaround worked but is not evident and you have to change your site language to English or you are going to have a hard time trying to find the Diazo theme support option. |
…tory is not registered. This can happen if Diazo is not installed. We might want to install it when migrating to Plone 5, but meanwhile this fixes the immediate error in Plone 5. With the meta-bundles plip, added in Plone 5.0.3, it would already fail during migration. Fixes #1187
In coredev it already fails when doing the migration: Traceback (most recent call last):
File "/Users/maurits/community/plone-coredev/5.0/src/Products.CMFPlone/Products/CMFPlone/MigrationTool.py", line 268, in upgrade
step['step'].doStep(setup)
File "/Users/maurits/community/plone-coredev/5.0/src/Products.GenericSetup/Products/GenericSetup/upgrade.py", line 166, in doStep
self.handler(tool)
File "/Users/maurits/shared-eggs/plone.app.upgrade-1.3.21-py2.7.egg/plone/app/upgrade/v50/alphas.py", line 34, in to50alpha3
loadMigrationProfile(context, 'profile-plone.app.upgrade.v50:to50alpha3')
File "/Users/maurits/shared-eggs/plone.app.upgrade-1.3.21-py2.7.egg/plone/app/upgrade/utils.py", line 134, in loadMigrationProfile
context.runAllImportStepsFromProfile(profile, purge_old=False)
File "/Users/maurits/community/plone-coredev/5.0/src/Products.GenericSetup/Products/GenericSetup/tool.py", line 379, in runAllImportStepsFromProfile
dependency_strategy=dependency_strategy)
File "/Users/maurits/community/plone-coredev/5.0/src/Products.GenericSetup/Products/GenericSetup/tool.py", line 1414, in _runImportStepsFromContext
message = self._doRunImportStep(step, context)
File "/Users/maurits/community/plone-coredev/5.0/src/Products.GenericSetup/Products/GenericSetup/tool.py", line 1226, in _doRunImportStep
return handler(context)
File "/Users/maurits/community/plone-coredev/5.0/src/Products.CMFPlone/Products/CMFPlone/resources/exportimport/bundles.py", line 19, in combine
combine_bundles(site)
File "/Users/maurits/community/plone-coredev/5.0/src/Products.CMFPlone/Products/CMFPlone/resources/browser/combine.py", line 84, in combine_bundles
persistent_directory = getUtility(IResourceDirectory, name="persistent")
File "/Users/maurits/shared-eggs/zope.component-3.9.5-py2.7.egg/zope/component/_api.py", line 169, in getUtility
raise ComponentLookupError(interface, name)
ComponentLookupError: (<InterfaceClass plone.resource.interfaces.IResourceDirectory>, 'persistent') We may want to install Diazo in plone.app.upgrade. But for now, I have created a pull request in CMFPlone with the fix I already mentioned above. |
Branch: refs/heads/master Date: 2016-02-25T22:43:34+01:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/Products.CMFPlone@66bf70a Do not fail when viewing any page, when the persistent resource directory is not registered. This can happen if Diazo is not installed. We might want to install it when migrating to Plone 5, but meanwhile this fixes the immediate error in Plone 5. With the meta-bundles plip, added in Plone 5.0.3, it would already fail during migration. Fixes plone/Products.CMFPlone#1187 Files changed: M CHANGES.rst M Products/CMFPlone/resources/browser/combine.py M Products/CMFPlone/resources/browser/scripts.py M Products/CMFPlone/resources/browser/styles.py M Products/CMFPlone/traversal.py Repository: Products.CMFPlone Branch: refs/heads/master Date: 2016-02-26T09:23:47+01:00 Author: Jens W. Klein (jensens) <jk@kleinundpartner.at> Commit: plone/Products.CMFPlone@0d5172a Merge pull request #1412 from plone/issue-1187 Do not fail when viewing any page, when the persistent resource directory is not registered. Files changed: M CHANGES.rst M Products/CMFPlone/resources/browser/combine.py M Products/CMFPlone/resources/browser/scripts.py M Products/CMFPlone/resources/browser/styles.py M Products/CMFPlone/traversal.py
We test the migration from plone 4.3 to plone 5.0. The database can be found here:
https://www.dropbox.com/s/v1ni5l4ajy6qnfo/43-langs-pam-dx.tar.gz?dl=0
Installation:
The plone 5.0 Migration step should make sure that both "Diazo theme support" and "Barceloneta Theme" are also run during the migration. If not you will get an error like:
The text was updated successfully, but these errors were encountered: