drush
drush copied to clipboard
Add a command to rebuild all display- and form-modes
This is a command that let you recreate all display- and form-modes with $ drush entity:rebuild-display-config
.
In https://www.drupal.org/project/drupal/issues/2915036 we introduces a functionality that fires on field_insert on a per entity_type and bundle bases. This command does the same but then for all entity_types and bundles.
There is no regression or misconfiguration issue. The command fixes possible misconfigurations.
Ok cool the PR is here :) Now it won't be lost. Please give me some time to doublecheck everything.
Thanks. Some quick notes:
- Any error handling needed?
- A preview of what updates will be confirmed before confirmation
- Can this move to src/Drupal/commands. Then it won't need @bootstrap full since all commands there are full.
- Testing
- "Rebuild display configuration" should be "form and display configuration"
Still work-in-progress; A confirmation and preview of what entity-types and bundles will be processed is done YAY
| Can this move to src/Drupal/commands. Then it won't need @bootstrap full since all commands there are full. That's done too
@weitzman I think all the needs-work things are fixed. The ticket was locked quit a while, because of an unrelated build-check failure. Would be awesome if this issue could be merged :)
I changed target branch to 11.x. There is some unrelated changes showing in the PR. I'm still undecided about this in Drush core. When would users need to run this?
Sorry I missed your reply. Just now it's rebased to the 11.x branch.
I'm still undecided about this in Drush core. When would users need to run this? The command is useful for sites where the exported config of display is different than the actual (in database stored) config. What I have seen a lot, is that when a field is added to a bundle and then the config is exported, the actual export contains many more (unrelated) changes. This happens if a display is not re-saved every time the dependencies of the display changes. The goal of this new command is mostly to get cleaner config-exports.