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

Settings are lost on 3.1 #49

Closed
timkelty opened this issue Jan 18, 2019 · 3 comments
Closed

Settings are lost on 3.1 #49

timkelty opened this issue Jan 18, 2019 · 3 comments
Labels

Comments

@timkelty
Copy link
Contributor

Any section/category type field settings seem to be lost after a 3.1 upgrade.

Inspecting the HTML source on the field settings page, it would seem it is now expecting a UID, not an ID.

Not sure, but maybe related to this line from the 3.1 release notes:

System user permissions now reference things by their UIDs rather than IDs (e.g. editEntries: rather than editEntries:).

Seems problematic, and probably not just isolated to this plugin.

@timkelty
Copy link
Contributor Author

This seems to be the offending commit, changing the key of Element's sources to be UIDs: craftcms/cms@4f5a9e3

@sebastian-lenz
Copy link
Owner

Hi, thank you for reporting this. Indeed, it seems like the Craft core has changed the formatting of the key property of the element sources array as obtained by craft\base\ElementInterface::sources(). Before it contained the id of the entry type and was something like

section:8

After the update to Craft 3.1.* the key is a string containing the uid like

section:a10ef3a4-0b28-4831-b6b6-195167b87212

Therefore all field settings of the link field saved before the 3.1 update become invalid and have to be reconfigured.

@sebastian-lenz
Copy link
Owner

Okay, I've added a simple validator to rewrite the settings on load. A new release is out containing the fix. However, if the field has been saved in Craft 3.1 the settings are already lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants