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? #346

Open
gforcada opened this issue Jan 3, 2023 · 3 comments
Open

Missing upgrade step? #346

gforcada opened this issue Jan 3, 2023 · 3 comments

Comments

@gforcada
Copy link
Member

gforcada commented Jan 3, 2023

We are using 8.0.0b1 (with a few patches on top) and when trying to upgrade to latest stable (8.4.2) we are getting the usual KeyError from plone.registry as prefix_wildcard option was added on #271.

As there is no upgrade step, when one updates their website with a newer version of c.solr all usages of Solr are broken until one manually creates the record 😕

Since #271 is already 2 and a half years old and it has been in a release since 8.2.0 I guess this is way too old news? 🤔

Testing it locally one can create a fake record prior to upgrading to +8.2.0:

from plone import api
from plone.registry import Record
from plone.registry.field import Bool

registry = api.portal.get_tool('portal_registry')
key = 'collective.solr.prefix_wildcard'  # the registry has a prefix, see https://github.com/collective/collective.solr/blob/main/src/collective/solr/profiles/default/registry.xml#L3
registry.records[key] = Record(Bool(title=''), False)

After running this, one can then safely update to +8.2.0 🎉

@gforcada
Copy link
Member Author

gforcada commented Jan 3, 2023

Actually, after testing, it is not only prefix_wildcard but also, in our case, force_simple_search and allow_complex_search 😅

@adrianschulz
Copy link
Contributor

Same here. But luckily this is easy to fix with manually adding the records.

I don't know how to handle this since the change was long ago.

@tisto
Copy link
Member

tisto commented Jan 31, 2023

Crap. I wasn't aware of this. We could create an upgrade step in the 8.x.x series to fix this.

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

3 participants