tep to reproduce on 8.6:

-create a group
-delete this group

you will get this error:

Error: Call to a member function addMessage() on null in Drupal\block_visibility_groups\Form\BlockVisibilityGroupDeleteForm->submitForm() (line 62 of modules/contrib/block_visibility_groups/src/Form/BlockVisibilityGroupDeleteForm.php).

Comments

DuneBL created an issue. See original summary.

bala.addweb’s picture

Status: Active » Needs review
StatusFileSize
new972 bytes

@DuneBL, Please find my attached patch that solves the mentioned error.

dunebl’s picture

@nikunj.addweb thank you for the patch!
I confirm it solves the issue

hctom’s picture

StatusFileSize
new551 bytes
new872 bytes

The supplied patch solves the error, but not the actual problem ;) So here is a new patch that really outputs the desired message by fixing the wrong implementation of the messenger service. $this->messenger property was used directly instead of $this->messenger() method which instantiates the service if it does not exist already.

patrickmichael’s picture

Patch #4 worked for me, thank you for this.

jnettik’s picture

Status: Needs review » Reviewed & tested by the community

I can also confirm the patch in #4 works. Thank you!

7thkey’s picture

Patch #4 works for me. Thx!

scotwith1t’s picture

Version: 8.x-1.3 » 8.x-1.x-dev

Another +1 for #4. Thanks :)

finex’s picture

Thanks for the patch!

luke.leber’s picture

#4 works on 8.6.

brightbold’s picture

Patch in #4 also solved the problem for me on 8.6. +1!

joelpittet’s picture

Priority: Minor » Normal

This is not a minor problem, but thanks for the patch! 8.7 issue as well.

  • joelpittet committed eed1d6e on 8.x-1.x authored by hctom
    Issue #3000396 by hctom, nikunj.addweb, DuneBL, PatrickMichael, jnettik...
joelpittet’s picture

Status: Reviewed & tested by the community » Fixed

Thanks I've committed this to the latest dev release.

Status: Fixed » Closed (fixed)

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

chris matthews’s picture

@maintainers, would it be possible to push this fix to a 8.x-1.4 release?