I enabled IMCE for a Drupal 8 website, for convenience to site content admins to manage files directly.

However, since IMCE is respecting file usage references (which is actually a great feature), it is not possible to delete any file if they were added via another module, or more accurately, if the file has any references in `file_usage` table.

IMCE Delete plugin uses a config, "ignore_usage" prior the real deletion can occur.

What's the best way to set "ignore_usage" to TRUE? And what would be the downside of it, besides the obvious?

Thanks,
Osman

Comments

osman created an issue. See original summary.

osman’s picture

I was able to change ignore_usage value by simply altering the configuration for each profile.

i.e. For a profile called "Manager":


$config= \Drupal::service('config.factory')->getEditable('imce.profile.manager');
$config->set('conf.ignore_usage', TRUE);
$config->save();

Hope this will help others with the same problem.

aaronbauman’s picture

you can also do it with drush:
drush cset imce.profile.admin conf.ignore_usage 1

thalles’s picture

Thanks @all!

thalles’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.