Commit 8fa75fc "Fix Drupal 9 deprecation errors" produces the following error, when saving the paragraphs set form. Noticed on Drupal core 8.6.14.

Steps to reproduce:
· Go to /admin/structure/paragraphs_set
· Add or edit a paragraphs set
· Save the form

Result:
Setting seem to be saved, but error appears – no redirect.

The website encountered an unexpected error. Please try again later.
Error: Call to a member function addMessage() on null in Drupal\paragraphs_sets\Form\ParagraphsSetForm->save() (line 166 of modules/paragraphs_sets/src/Form/ParagraphsSetForm.php).
Drupal\paragraphs_sets\Form\ParagraphsSetForm->save(Array, Object)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 51)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 589)
Drupal\Core\Form\FormBuilder->processForm('paragraphs_set_edit_form', Array, Object) (Line: 318)
Drupal\Core\Form\FormBuilder->buildForm('paragraphs_set_edit_form', Object) (Line: 93)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
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: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Comments

ABaier created an issue. See original summary.

  • 6a2fcb8 committed on 8.x-2.x
    #3050560: Fix call to messenger
    
    Signed-off-by: Stefan Borchert...
stborchert’s picture

Status: Active » Fixed

Damn, $this->messenger() would have been the correct way to reference the MessengerInterface.
Fixed and committed. I created a new release of Paragraphs Sets and Paragraphs Editor Enhancements (same bug).

Thanks for testing and reporting!

Status: Fixed » Closed (fixed)

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