collective / collective.lazysizes

Integration of lazysizes, a lightweight lazy loader, into Plone.
https://pypi.org/project/collective.lazysizes
6 stars 2 forks source link

Error running upgrade from 3.0.0 to 3.1 #42

Closed erral closed 6 years ago

erral commented 7 years ago

When running the upgrade from version 3.0.0 to 3.1 in a Plone 4.3.x site, I get the following error:

2017-10-03 15:30:57 ERROR Zope.SiteErrorLog 1507037457.910.188563624728 http://localhost:3700/Plone/portal_quickinstaller/prefs_reinstallProducts
Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module Products.CMFCore.FSPythonScript, line 127, in __call__
  Module Shared.DC.Scripts.Bindings, line 322, in __call__
  Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
  Module Products.PythonScripts.PythonScript, line 344, in _exec
  Module script, line 11, in prefs_reinstallProducts
   - <FSPythonScript at /Plone/portal_quickinstaller/prefs_reinstallProducts>
   - Line 11
  Module Products.CMFPlone.QuickInstallerTool, line 100, in upgradeProduct
  Module Products.GenericSetup.upgrade, line 194, in doStep
  Module Products.GenericSetup.tool, line 349, in runImportStepFromProfile
  Module Products.GenericSetup.tool, line 1226, in _doRunImportStep
   - __traceback_info__: plone.app.registry
  Module plone.app.registry.exportimport.handler, line 49, in importRegistry
  Module plone.app.registry.exportimport.handler, line 94, in importDocument
  Module plone.app.registry.exportimport.handler, line 281, in importRecords
  Module zope.dottedname.resolve, line 38, in resolve
ImportError: No module named IBundleRegistry

The only file where IBundleRegistry is used is registry.xml and I see that there is already a condition on that file file requiring condition="have plone-5" but it looks like this is ignored. Is it perhaps related to the plone.registry version?

I have plone.app.registry 1.2.4 and plone.registry 1.0.4

erral commented 7 years ago

Indeed I had to upgrade to plone.app.registry 1.5 to be able to use the have plone-5 condition and now I can run the upgrade. condition support was included on p.a.registry 1.4 but have conditions were included on 1.5.

Anyway p.a.registry claims to support only Plone 5.x, but it works in my Plone 4.3.x

https://pypi.python.org/pypi/plone.app.registry/1.5#changelog

hvelarde commented 7 years ago

thanks! seems I forgot we need to enforce use of plone.app.registry >=1.5.

can you help me with a small pull request? today I'm working on other stuff here.

cc @thet

erral commented 7 years ago

Indeed. See #43

erral commented 6 years ago

We can close this.