Fixed
Project:
Entity Usage
Version:
5.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Jul 2026 at 15:13 UTC
Updated:
23 Jul 2026 at 08:27 UTC
Jump to comment: Most recent
Trash context leak on missing entity — src/Controller/ListUsageController.php:224-241
getRows() sets $this->trashManager->setTrashContext('ignore') before loading the target entity, but if $entity fails to load, the method returns early (if (!$entity) { return $rows; }) before the restore block at line 375. The trash context stays 'ignore' for the rest of the request, which can make trashed entities visible elsewhere on the same page/request.
wrap the load-and-build logic in try/finally, or restore before the early return.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #6
alexpott