Problem/Motivation
The newly added localgov_elections_update_10008() and localgov_elections_update_10010() update hook implementations are overwriting existing configs while updating those configs. Affected configs include:
- core.entity_form_display.node.localgov_area_vote.default
- core.entity_view_display.node.localgov_area_vote.default
- core.entity_view_display.node.localgov_area_vote.teaser
After running these updates, the UUID is gone along with mentions of some fields from other modules; example: localgov_service_contacts, localgov_services_parent, etc.
This issue only affects existing users of this module.
Steps to reproduce
$ composer update drupal/localgov_elections
$ drush updatedb
$ drush config:export
$ cd /path/to/drupal/config/store/
$ git diff
Suggested testing steps
- Install localgov_elections 3.1
- Enable localgov_elections demo_content
- Enable localgov_demo_content
- Make some customisations to area vote form or view displays
- Get the branch code.
- Run drush updb
- Updates should apply the configuration without affecting other customisations
Risks to consider
Update hooks were already run from 3.2.0
Release notes should mention the issue and suggest manual updates to desired state.
Proposed resolution
localgov_elections_update_10008() and localgov_elections_update_10010() should alter existing configs rather than overwriting them with their newest copy from /config/install/. localgov_elections_update_10009() offers a good example.
Issue fork localgov_elections-3587948
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 #4
tonypaulbarkerComment #5
tonypaulbarkerComment #6
progga commentedLooks okay to me. Thank you Tony for the midnight fix :)
Test steps I followed:
- Setup a fresh LocalGov Drupal site with localgov_elections:3.0.0.
- drush config:export --yes
- composer update drupal/localgov_elections
- Grabbed a fixed copy of the localgov_elections.install file.
- drush updatedb
- drush config:export --diff
Comment #7
progga commented