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'm trying to install IMCE & IMCE WYSIWYG programatically via an update hook for deployment.
I've narrowed down an issue where the IMCE checkbox/plugin is not available if you are submitting the WYSIWYG profile form using drupal_form_submit().
This line...
if (!module_invoke('imce', 'access')) {
return;
}
...returns FALSE during a "drush updb" (even if I do "drush updb -u 1"). As a result, the plugin is not loaded and cannot be installed.
Comments
Comment #1
nicholasThompsonActually this issue is partly related to imce_access. Using "global $user" means that, as drush runs "updb" anonymously, this is why it fails.
My work around is to switch the global user during my update process - not ideal though.