Problem/Motivation
When editing module config page and saving changes I get error:
Error: Call to a member function addMessage() on null in Drupal\node_title_validation\Form\NodeTitleValidationAdminForm->submitForm() (line 228 of /var/www/html/web/modules/contrib/node_title_validation/src/Form/NodeTitleValidationAdminForm.php)
Proposed resolution
Replace node_title_validation/src/Form/NodeTitleValidationAdminForm.php line 228 from
$this->messenger->addMessage($this->t('Node Title Validation Configurations saved successfully!'));
to
$this->messenger()->addMessage($this->t('Node Title Validation Configurations saved successfully!'));
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 3414294-7.patch | 1.78 KB | keshavv |
Issue fork node_title_validation-3414294
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 #7
keshavv commentedCreated patch, please review.
Comment #9
rohan_singh commentedKindly review this MR.
Comment #11
eskowe commentedI tested and this works.
Comment #13
smustgrave commented