Problem/Motivation
With Queue UI 3.2.3 and Queue Statistics enabled, Queue UI finds no plugin for any queue. The Inspect operation disappears from admin/config/system/queue-ui, and the inspect and item pages do not work.
Queue UI 3.2.3 switched its plugins to PHP attributes (#3537446: Use PHP attributes instead of doctrine annotations for plugin type definitions). The plugins now declare class_name as the fully qualified class, for example Drupal\Core\Queue\DatabaseQueue. QueueUIManager::fromQueueName() compares that with get_class($queue). With Queue Statistics enabled every queue is a Drupal\queue_stats\MonitoredQueue, so no plugin matches. Queue UI 3.2.0 to 3.2.2 matched on the short class name, which MonitoredQueueUIManager::queueClassName() already resolves to the decorated queue.
Steps to reproduce
- On a site with at least one queue worker, install Queue UI 3.2.3 and Queue Statistics.
- Visit
admin/config/system/queue-ui: no queue has an Inspect operation. - Uninstall Queue Statistics and reload: the Inspect operations appear.
Proposed resolution
Override fromQueueName() in MonitoredQueueUIManager and match the plugins against the class of the decorated queue, by its full and its short name.
Remaining tasks
None.
User interface changes
The Inspect operation works again for monitored queues.
API changes
MonitoredQueueUIManager overrides fromQueueName(). This needs Queue UI 3.2 or later, which #3482659: Fatal error: MonitoredQueueUIManager::queueClassName($queue) not compatible with QueueUIManager::queueClassName already requires.
Data model changes
None.
AI-Generated: Yes (Used Claude Code to find the cause, write the fix and a kernel test.)
Issue fork queue_stats-3634608
Show commands
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 #2
achtonComment #5
achton