Problem
Currently, this module disables the default "files" View during its hook_install() implementation. This works fine if the module is being enabled on an already installed site. But if it is part of the installation process of a custom installation profile, the registry of the View module will not have completed, and $view = View::load('files') will return FALSE and will not disable the core "files" View.
Steps to Reproduce
1. Add views and file_entity to the list of modules to be installed in an installation profile, either in its info.yml file or it its hook_install() implementation.
2. Install the site.
3. The core "files" view will remain enabled.
Proposed Solution
Move the disabling of the core view to hook_modules_installed().
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | file_entity-disable_view_later-2939000-2.patch | 626 bytes | mark_fullmer |
Comments
Comment #2
mark_fullmerPatch attached.
Comment #3
weseze commentedJust tried this patch with a clean install on D8.5 with our installation profile.
It only works if you rebuild cache between installing drupal and enabling this module.