Problem/Motivation

When releasing an item in the queue using the release button we get the following error

TypeError: Drupal\queue_ui\Form\ConfirmItemReleaseForm::__construct(): Argument #1 ($messenger) must be of type Drupal\Core\Messenger\Messenger, Drupal\admin_toolbar_messages\AdminAwareMessenger given, called in /var/www/html/app/modules/contrib/queue_ui/src/Form/ConfirmItemReleaseForm.php on line 65 in Drupal\queue_ui\Form\ConfirmItemReleaseForm->__construct() (line 49 of modules/contrib/queue_ui/src/Form/ConfirmItemReleaseForm.php).
Drupal\queue_ui\Form\ConfirmItemReleaseForm::create(Object) (Line: 28)
Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition('\Drupal\queue_ui\Form\ConfirmItemReleaseForm') (Line: 48)
Drupal\Core\Controller\HtmlFormController->getFormObject(Object, '\Drupal\queue_ui\Form\ConfirmItemReleaseForm') (Line: 58)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
include('/var/www/html/app/index.php') (Line: 3)

Steps to reproduce

  1. Install the module admin_toolbar_messages
  2. Install the Queue_ui module
  3. Create an item in the queue
  4. Try to release the item through the interface

Proposed resolution

"program to an interface not an implementation"

See patch

Remaining tasks

Test and merge

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 3455980-2.patch3.04 KBadebruin

Issue fork queue_ui-3455980

Command icon 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

adebruin created an issue. See original summary.

adebruin’s picture

StatusFileSize
new3.04 KB
adebruin’s picture

Issue summary: View changes

timohuisman made their first commit to this issue’s fork.

timohuisman’s picture

Status: Active » Needs review

Somehow my colleague @adebruin couldn't create a MR, so I made one with the patch from #2

ptmkenny’s picture

Status: Needs review » Reviewed & tested by the community

I reviewed MR46 and I agree with this change. We should always use the core interface rather than a specific implementation if an interface is provided.

ptmkenny’s picture

Version: 3.1.4 » 3.2.x-dev

3.2.x-dev is the current development target.

voleger’s picture

Status: Reviewed & tested by the community » Needs work

Needs rebase for 3.2.x

voleger’s picture

Status: Needs work » Fixed

Fixed, thanks

Status: Fixed » Closed (fixed)

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