Problem/Motivation
When PVM is enabled for a paragraph type and the widget settings are changed any modifications to the default widget settings are reset back to the defaults.
Steps to reproduce
- Enable PVM on a paragraph type.
- Modify the PVM form widget (e.g., uncheck the "Default" view mode as an available option).
- Edit and save the paragraph type (without making any changes).
- Review the PVM form widget settings and note they have reverted to the default state.
Proposed resolution
Modify paragraph_view_mode_form_paragraphs_type_edit_form_submit to check the current config for PVM on the paragraph type and only add the PVM field and form display when PVM is going from disabled to enabled.
Remaining tasks
Patch incoming.
User interface changes
None.
API changes
None.
Data model changes
None.
Issue fork paragraph_view_mode-3247770
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
wellsComment #5
sayco commentedThanks for reporting and contributing to the patch, all looked good. Merged to the dev branch. I'll prepare a new release containing this fix within a few days.