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.
We get this error when try to install the module:
"Unable to install File entity, core.entity_view_mode.file.thumbnail already exists in active configuration."
How to reproduce
- Install the module
- Un-install the module
- Install the module again
Comment | File | Size | Author |
---|---|---|---|
#16 | 2715173.patch | 492 bytes | oriol_e9g |
#4 | can_t_reenable_module-2715173-4.patch | 1.38 KB | grahl |
Comments
Comment #2
jfcolomer CreditAttribution: jfcolomer as a volunteer commentedI had the same issue, this worked for me:
https://www.drupal.org/node/2670594#comment-10901180
Comment #3
BerdirThe config entity should either be moved to optional config or have a enforced dependency.
That said, why would you want to re-install file_entity like that?
Comment #4
grahlAttached is a trivial patch moving the file to optional.
I'm not sure the core update is actually a necessary step and uninstalling and reinstalling might already be sufficient to trigger it. I don't have the time to test that cleanly at the moment, sorry.
Comment #5
otarza CreditAttribution: otarza for World Food Programme commentedI can confirm that this also happens when you already have
core.entity_view_mode.file.thumbnail
config in your site and you try to install `file_entity` module.Comment #6
otarza CreditAttribution: otarza for World Food Programme commentedI can confirm that #4 patch works.
Comment #7
otarza CreditAttribution: otarza for World Food Programme commentedComment #10
claudiu.cristeaComment #13
BerdirThe tests show why this doesn't work. Other config depends on this, you can't move only those to optional, you have to move everything that depends on it.
Comment #14
piyuesh23 CreditAttribution: piyuesh23 at QED42 commentedWhy don't we consider deleting the config created as a part of install process in the uninstall hook here? I think the problem here is not related to missing dependencies, but a config left in the site while un-installing the module & the install process trying to create the same again.
Comment #15
oriol_e9gAn easy fast fix can be:
Comment #16
oriol_e9gWhy not enforce this configuration?
How to reproduce the error:
Comment #17
oriol_e9gComment #18
jian he CreditAttribution: jian he commented#16 looks good for me.
Comment #19
mausolos CreditAttribution: mausolos commentedBtw, I was able to workaround this issue by doing:
Of course, then when I went to uninstall, I got the error:
Soooooo...
I ran drush entity-updates. More errors:
Hmm.. did that do the trick, though?
From this point on, the behavior is predictable and just goes in a circle. FYI, but I can't speak to how solid this approach is.
Comment #20
oriol_e9gThe easiest solution is use the module with the patch in #16 while we wait the commit. You can add the patch in composer.json to ensure that always install or update the module with the patch applied.
Comment #22
joseph.olstadComment #23
websiteworkspace CreditAttribution: websiteworkspace commentedThis problem actually persists in the current version after updating to Drupal 8.4.2.
Neither running drush entup or drupal update:entities fixes this problem.
(see also)
https://www.drupal.org/project/file_entity/issues/2914935
Comment #24
websiteworkspace CreditAttribution: websiteworkspace commentedComment #25
oriol_e9g@websiteworkspace you need to use the dev version of File Entity (fieldable files) module, upgrade drupal core will do nothing.
Comment #26
websiteworkspace CreditAttribution: websiteworkspace commented@oriol_e9g ...
Please note ...
It has been possible to fix the problem by issuing the following SQL commands on the database:
The update to 8.4.2 WAS NOT an attempt to "fix" the problem.
The update of core to 8.4.2 preceded the problem's appearance and is was what precipitated the problem described.
It isn't reasonable to be running the dev branch module on the site in any event.
Furthermore its module versioning is all managed by composer, and a dev branch of that isn't warranted.
anyway ...
the problem is now fixed.
Meanwhile, it seems like the maintainers of the module should complete necessary testing of their fix and role that fix into a release version of the module, rather than suggesting that site's run a dev branch version.
Comment #27
BerdirWhat you are describing is about the issue you yourself linked/mentioned above, not *this*. This was just about config not being removed that prevented a re-install.
The maintainers are mostly using their free time to maintain this project and help people like you, there really is no need to rant about what we should or shouldn't do. You're welcome to help by providing and reviewing patches and supporting others. Also keep in mind that you are using a beta version, in the end, there's not much difference between using a beta version and dev.
And you can for example pin composer to a specific commit of a dev version, it's absolutely possible to use dev versions with composer.
Comment #29
MartinMa CreditAttribution: MartinMa as a volunteer commentedI just wanted to install filde download tracker. Got the error message "It was not possible to install File entity. core.entity_view_mode.file.thumbnail already exists in the active configuration." too.
Removed core.entity_view_mode.file.thumbnail in SQL database
On second attempt to install got "fatal error"
But on third run it worked.
Long time ago I had file entity installed. Hope problem has gone now.