Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've installed and uninstalled the Display Suite and Display Suite Extras module once. Now I can't install it again. Every time I try I get following error: Unable to install Display Suite Extras, core.entity_view_mode.node.revision already exists in active configuration.
Comment | File | Size | Author |
---|---|---|---|
#12 | 2670594-reinstall-ds-extras-fails.patch | 954 bytes | aspilicious |
Comments
Comment #2
drupalfox CreditAttribution: drupalfox commentedComment #3
finkenmann CreditAttribution: finkenmann commentedI got the exact same Message and i'm unable to activate the DS Extra Module in my Base Drupal8 Installation. After that error i've uninstalled all Contrib Modules and reinstalled DS again. Again i got en error, but with drush i've got much more detailed information, but i'm afraid to do anything in these files.
Comment #4
halefxTo get around this error, you just need to move (or you could just remove the file, but moving it is better) ds/modules/ds_extras/config/install/core.entity_view_mode.node.revision.yml to ds/modules/ds_extras/config/optional/core.entity_view_mode.node.revision.yml (you'll have to create the "optional" directory).
Going forward, core.entity_view_mode.node.revision.yml should probably be changed from
to
which will uninstall the configuration when ds_extras is uninstalled instead of abandoning the configuration in Drupal during uninstall. Or move it from "install" to "optional" if it should stay behind, etc.
Comment #5
finkenmann CreditAttribution: finkenmann commentedThanks halefx. #4 fixed the problem. It really happens only if i uninstall the modul and try to reinstall it again. If i install ds the first time, it works fine. So my error occured, because i had an other problem with a modul and uninstalled a lot of contributed moduls to search fot the error.
So, is this a bug, which should be fixed in the next version, or do i have to do this changes after an update of ds again?
Comment #6
halefxIt is a bug that needs to be fixed in a future version of DS.
Comment #7
OlafskiSimilar case: on reinstall of DS I got the message "Configuration objects (core.entity_view_mode.node.revision, ds_extras.settings) provided by ds_extras already exist in active configuration" when I tried to enable DS Extras.
In addition to #4, I renamed ds/modules/ds_extras/config/install/ds_extras.settings.yml temporarily. After that, I was able to enable DS Extras.
Comment #8
jacekrszewczyk CreditAttribution: jacekrszewczyk commentedThank you!
Comment #9
cmwelding CreditAttribution: cmwelding commentedFacing similar problem while reinstalling the module. Works fine on the first install. Uninstalled Display Suite Extras and reinstalled. Throws error on a clean Drupal installation. Its is bug!!
Error:
"Unable to install Display Suite Extras, core.entity_view_mode.node.revision already exists in active configuration."
Comment #10
kingfisher64 CreditAttribution: kingfisher64 commented#4 works, thanks halefx
Will this be fixed in latest dev soon? Not working in latest dev
Comment #11
softone CreditAttribution: softone commentedComment #12
aspilicious CreditAttribution: aspilicious commentedCan someone verify this works?
Works means:
- The module installs again
- The view mode actually exist on a fresh installation
This also needs a test.
The test should be named something like "ReinstallTest".
In the test all the DS modules should be reinstalled.
Than I'm sure we don't introduce any regressions in the future.
Playing with configuration is dangerous :)
Can someone finish this patch, would help me a lot.
Else this issue will not be committed before the end of june.
Comment #13
Joefry CreditAttribution: Joefry as a volunteer and commentedI tried to reinstall DS_Extras after patch in #12 and got this: Unable to install Display Suite Extras, core.entity_view_mode.node.revision already exists in active configuration.
Any suggestions welcome.Added: After rereading all the comments here, I used suggestion in #4 and managed to reinstall Ds_extras
Comment #14
aspilicious CreditAttribution: aspilicious commentedJoefry, the patch in 12 is the same as comment 4. Are you sur eyou applied the patch correctly?
Comment #15
Joefry CreditAttribution: Joefry as a volunteer and commentedaspilicious, I see that looking at the patch. Seems clear it must have been some error on my application of patch.
Comment #16
halefxThe patch looks good to me, but it will only help people who have not already installed the DS Extras module. The Yaml code being modified by the patch is run at installation, so if the module has previously been installed, it's too late for this patch to help. Manually moving the Yaml file as described in #4 is the quickest solution for people in that situation.
Comment #17
halefxRE: patching a update so that "The module installs again"...
There has been a lot of core discussion around finding a way to reload/refresh configuration changes in modules, but I haven't followed the progress of that enough to know if a solution has been reached.
Comment #18
halefxThis can probably be accomplished using a module update function if anyone here has time to look into it. See https://drupal.stackexchange.com/questions/164713/how-do-i-update-the-configuration-of-a-module for an example.
Comment #19
aspilicious CreditAttribution: aspilicious commentedPlease *test* the patch before commenting.
The patch MOVES the file so it should work as it is exactly what 4 does.
If someone can verify this I can commit this so this discussion is over. :)
More explanation:
If I'm correct the uninstall works fine, it is the installation that is broken.
When you apply the patch and uninstall, the display doesn't get deleted.
When installing again it won't fatal because the file is moved to optional.
Comment #21
aspilicious CreditAttribution: aspilicious commentedI tested this patch myself again and committed it.