Problem/Motivation
Today I tested the upgrade to 8.x-2.6 and updating to schema version 9004 (form_mode_control_update_9004()). After the DB/config updates my form mode control settings no longer functioned.
During debugging I checked the /admin/structure/display-modes/form/config-form-modes page and found that all modes were set to "Default". So even though the config schema was updated it was obvious that something was wrong with the result. I manually set the correct form modes in the admin page and saved. The form modes began to work correctly. I exported the configuration a second time. There is a difference between the post-update config and the form-generated config:
Post-update config:
defaults:
node:
submission:
edit:
reviewer: submission_edit
supervisor: submission_edit
administrator: submission_edit
Form-generated config:
defaults:
node:
submission:
update:
reviewer: submission_edit
supervisor: submission_edit
administrator: submission_edit
If you haven't noticed, the update generated configuration with an "edit" key, whereas the form set an "update" key.
Steps to reproduce
I started with version 8.x-2.4.
- Add a new edit form mode for nodes.
- Move some fields around in that form mode for a content type. That way it's obvious which form mode is being displayed.
- Set that form mode to be viewed by Administrators when editing the content.
- Create an instance of the content.
- Visit the edit form for the instance of the content that you just created. Verify that you're viewing the correct form mode.
- Update the module to 8.x-2.6 and run database updates.
- Visit the content edit form and see that you're not viewing the correct edit form mode.
- View the site's active configuration (
drush cex, etc.) and see that it has an "edit" key instead of "update".
Comments