Skip to content
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

Missing upgrade step in Plone 5.1 #2331

Closed
sneridagh opened this issue Mar 5, 2018 · 5 comments
Closed

Missing upgrade step in Plone 5.1 #2331

sneridagh opened this issue Mar 5, 2018 · 5 comments

Comments

@sneridagh
Copy link
Member

sneridagh commented Mar 5, 2018

BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)

Missing upgrade step in Plone 5.1

What I did:

Upgrading from 5.1rc1 (version originally installed) to 5.1 triggered:

KeyError: 'Interface Products.CMFPlone.interfaces.controlpanel.IImagingSchema defines a field 'highpixeldensity_scales', for which there is no record.'

when accessing image scales. Checked out on the IImagingSchema, and the record was not there. I fixed it by executing manually this upgrade step (that indeed it exists for 5.1b2 to 5.1b3):

plone/app/upgrade/v51/profiles/to_beta3/registry.xml

Right now I can't take a look myself into this if someone can fix it quickly would be great.

What I expect to happen:

The scale record should be created on site's registry. Could happen to other versions to 5.1 as well.

What actually happened:

It errored :)

What version of Plone/ Addons I am using:

Plone 5.1, plone.restapi

/cc @tisto

@mauritsvanrees
Copy link
Sponsor Member

Confirmed.
This is due to the renaming of the retina_scales field to highpixeldensity_scales in bd04fe1.

Applying that registry.xml step would indeed fix it:

  <records interface="Products.CMFPlone.interfaces.IImagingSchema"
           prefix="plone" />

You would lose a previous setting of retina_scales, but I'd say it is unlikely that someone has changed this. And if they did, nothing bad happens. Would be nicer to migrate that setting, but that may be overkill. But it could be simple, I didn't try it yet.

@mrsaicharan1
Copy link
Contributor

mrsaicharan1 commented Mar 8, 2018

@sneridagh So would the probable fix for this issue be an addition of the highpixeldensity_scales record to https://github.com/plone/Products.CMFPlone/blob/master/Products/CMFPlone/profiles/dependencies/registry.xml?

@abosio
Copy link

abosio commented Mar 8, 2018

I think this is related.

We updated a 5.1b3 site to 5.1, purged retina_scales from the registry and added highpixeldensity_scales and we get AttributeError for retina_scales when loading our pages: retina-scales-error.txt

Using scales.tag(...) does not fix.

@mauritsvanrees
Copy link
Sponsor Member

@mrsaicharan1 No that would not be enough, and also not necessary. We need an upgrade step in plone.app.upgrade. That is always tricky to get right. I made a PR for this. You can have a look if you want: plone/plone.app.upgrade#152

@abosio: Did you override the version pin for plone.namedfile? http://dist.plone.org/release/5.1/versions.cfg pins it to 4.2.4, which as far as I can see cannot lead to the traceback you see.

@hvelarde
Copy link
Member

hvelarde commented Mar 8, 2018

I was thinking the same; I also took a look at the code and saw no traces of that attribute.

mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Mar 10, 2018
Branch: refs/heads/master
Date: 2018-03-08T23:51:21+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.app.upgrade@19e4f1d

Rename retina_scales to highpixeldensity_scales.

Fixes plone/Products.CMFPlone#2331

Files changed:
A plone/app/upgrade/v51/profiles/to_511/registry.xml
M CHANGES.rst
M plone/app/upgrade/v51/configure.zcml
M plone/app/upgrade/v51/profiles.zcml
Repository: plone.app.upgrade

Branch: refs/heads/master
Date: 2018-03-10T10:09:15+01:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: plone/plone.app.upgrade@c99b60b

Merge pull request #152 from plone/retina-rename-issue-2331

Rename retina_scales to highpixeldensity_scales.

Files changed:
A plone/app/upgrade/v51/profiles/to_511/registry.xml
M CHANGES.rst
M plone/app/upgrade/v51/configure.zcml
M plone/app/upgrade/v51/profiles.zcml
mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Mar 10, 2018
Branch: refs/heads/master
Date: 2018-03-08T23:51:21+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.app.upgrade@19e4f1d

Rename retina_scales to highpixeldensity_scales.

Fixes plone/Products.CMFPlone#2331

Files changed:
A plone/app/upgrade/v51/profiles/to_511/registry.xml
M CHANGES.rst
M plone/app/upgrade/v51/configure.zcml
M plone/app/upgrade/v51/profiles.zcml
Repository: plone.app.upgrade

Branch: refs/heads/master
Date: 2018-03-10T10:09:15+01:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: plone/plone.app.upgrade@c99b60b

Merge pull request #152 from plone/retina-rename-issue-2331

Rename retina_scales to highpixeldensity_scales.

Files changed:
A plone/app/upgrade/v51/profiles/to_511/registry.xml
M CHANGES.rst
M plone/app/upgrade/v51/configure.zcml
M plone/app/upgrade/v51/profiles.zcml
mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Mar 10, 2018
Branch: refs/heads/master
Date: 2018-03-08T23:51:21+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.app.upgrade@19e4f1d

Rename retina_scales to highpixeldensity_scales.

Fixes plone/Products.CMFPlone#2331

Files changed:
A plone/app/upgrade/v51/profiles/to_511/registry.xml
M CHANGES.rst
M plone/app/upgrade/v51/configure.zcml
M plone/app/upgrade/v51/profiles.zcml
Repository: plone.app.upgrade

Branch: refs/heads/master
Date: 2018-03-10T10:09:15+01:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: plone/plone.app.upgrade@c99b60b

Merge pull request #152 from plone/retina-rename-issue-2331

Rename retina_scales to highpixeldensity_scales.

Files changed:
A plone/app/upgrade/v51/profiles/to_511/registry.xml
M CHANGES.rst
M plone/app/upgrade/v51/configure.zcml
M plone/app/upgrade/v51/profiles.zcml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants