Steps to reproduce:
- Install Drupal
- Go to /admin/config/development/configuration/single/export
- Select 'Configuration type': 'Entity form display'
- Select 'Configuration name': 'node.article.default'
- Change 'Configuration type' to 'Entity view display'
- Actual result: The configuration for 'core.entity_form_display.node.article.default.yml' remains displayed
- Expected result: The configuration for 'core.entity_view_display.node.article.default.yml' should be displayed
Workaround: Change the 'Configuration name' option to anything else, then change it back, which forces the configuration to reload.
Proposed resolution: Force the 'Configuration name' selection to clear whenever the 'Configuration type' option is changed.
Original report
---
8.1.0-rc1
Error:
An entity with this machine name already exists but the UUID does not match.
To reproduce:
1. Perform Single item export (from DEV stage) with:
- Configuration type: Entity form display
- Configuration name: node.book.default
- Copy config into clipboard.
2. Perform Single item import ok with that using copy and paste into 'Entity form display' on PROD stage.
3. Perform Single item export (from DEV stage) with:
- Configuration type: Entity _view_ display
- Configuration name: node.book.default [BUG: stays the same name, but does NOT correspond with a view display, is the old form display]
- BUG: the 'Here is your configuration:' field has also not updated.
- Copy (incorrect) config into clipboard.
4. Attempt import into Entity _view_ display on PROD.
Gives error:
An entity with this machine name already exists but the UUID does not match.
Reason: in this pathological case (only) the configuration is not updating on moving from 'Entity form display' to 'Entity view display', it clearly thinks 'node.book.default' stands for the same thing in both cases, but it doesn't, in one case it's for the default edit form, in the other case it's for the default page view.
WORKAROUND: provoke a change bv selecting configuration name 'node.book.teaser' then go back to 'node.book.default', the configuration YAML snippet now updates correctly and copy-and-paste export/import works.
Comments
Comment #2
webel commentedThe same problem happens under all sorts of different cases. It happens whenever there is a 'Configuration name' that is (by name string only shared) between 'Configuration types'; when one changes the 'Configuration type' if the 'Configuration name' is the same (by chance) it does not update. you have to provoke the update by switching the 'Configuration name' to something else then back.
Comment #5
pameeela commentedI have come across this myself but never thought of it as a bug, since it's so easy to get around.
This definitely does not meet the criteria for major so moving to normal (Admin- or developer-facing bugs with a workaround).
Comment #6
pameeela commentedComment #7
alisonAgree -- super annoying bug, and catches people in traps sometimes! I was just explaining to a colleague how to export things, and fortunately he noticed that the "filename" below the export field hadn't changed.
-------
This issue is a duplicate of #3084436: Config export field should be cleared when config type changes -- not sure which issue to keep, someone else can decide.
For now, I'm just posting the same "YAAASSSS" comment on each issue + mentioning the other 👋
Comment #8
longwaveI'm closing this as a duplicate of the other issue, as they are describing the same bug. Usually we keep the older issue, but in this case the other issue already has a working patch attached.