Problem/Motivation
Installing the 'AI Assistant' recipe introduces an 'Access denied' issue when trying to add media.
I first found the issue in the current version and so reproduced in current dev version.
This is a major error which makes Drupal CMS unusable.
Steps to reproduce
Install latest dev version of Drupal CMS:
git clone https://git.drupalcode.org/project/drupal_cms.git
cd drupal_cms
ddev config --project-type=drupal11 --docroot=web --php-version=8.3
ddev start
ddev composer install
ddev launchCarry on with install, selecting site name, 'Starter' template and entering credentials.
Click: Media > Add Media > Add image
All fine.

Then install the AI Assistant:
Extend > Recommended add-ons > AI Assistant
Click: Media > Add Media
You see an access denied error.

I'm logged in as the admin user still.
The error in the logs is:
Path: /admin/content/media/bulk-upload. Drupal\Core\Http\Exception\CacheableAccessDeniedHttpException: in Drupal\Core\Routing\AccessAwareRouter->checkAccess() (line 114 of /var/www/html/web/core/lib/Drupal/Core/Routing/AccessAwareRouter.php).
Proposed resolution
User interface changes
Configuration changes
| Comment | File | Size | Author |
|---|---|---|---|
| Screenshot 2026-05-18 at 12.39.58.png | 36.25 KB | dunx | |
| Screenshot 2026-05-18 at 12.38.48.png | 77.06 KB | dunx |
Comments
Comment #2
dunx commentedI've done some additional investigation, starting from a base install of the current Drupal CMS and installing each module listed in the AI Assistant yaml before checking for the error.
I installed:
If I uninstall easy_encryption_admin, the error no longer occurs.
So the issue seems to be caused by the easy_encryption or easy_encryption_admin module. That had a new version 2 weeks ago, so the issue could have been introduced there.
This issue could be related https://www.drupal.org/project/easy_encryption/issues/3589914
Comment #3
dunx commentedFresh install of Drupal CSM. Enable easy_encryption and easy_encryption_admin (plus key) then the error manifests.
Comment #4
dunx commentedMore specifically, it seems to be the easy_encryption_admin module that's causing the issue. I install the whole of the AI Assistant recipe and just remove the admin module and the error no longer occurs.
Comment #5
dunx commentedUpdated project accordingly.
Comment #6
mxr576I have just realized due to a Drupal Slack ping that I have not got notification about this issue (or it lost in my mailbox).
Closing this as a duplicate of #3589914: Remove global _custom_access registration from Easy Encryption admin access checker which already has a patch to be ported.
Thanks for the detailed report here!