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

nicholasThompson’s picture

Actually 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.