collective / collective.lazysizes

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

ValueError while running upgrade step to version 5 #22

Closed hvelarde closed 8 years ago

hvelarde commented 8 years ago

The following error happened while upgrading the add-on on a customer's site and I don't know why:

2016-08-17T13:34:00 ERROR Zope.SiteErrorLog 1471451640.510.494953408165 http://www.cartacapital.com.br/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 101, in upgradeProduct
  Module Products.GenericSetup.upgrade, line 140, in doStep
  Module collective.lazysizes.upgrades.v5, line 18, in use_amd_version
  Module Products.ResourceRegistries.tools.BaseRegistry, line 947, in renameResource
  Module Products.ResourceRegistries.tools.BaseRegistry, line 428, in validateId
ValueError: Duplicate id ++resource++collective.lazysizes/lazysizes-umd.min.js

the workaround is to uninstall and reinstall the add-on.

rodfersou commented 8 years ago

@hvelarde maybe this can fix the problem https://github.com/collective/collective.texttospeech/blob/master/src/collective/texttospeech/upgrades/v2/__init__.py#L18-L20

hvelarde commented 8 years ago

@rodfersou we better pin a version of Products.ResourceRegistries that includes the fix, that is 2.2.12.

please fix collective.texttospeech also.