Problem/Motivation
At src/Plugin/Layout/LayoutOptions.php:463 we have:
$this->messenger->addError(t("Option definition, @option (@title), does not define a plugin id", ['@option' => $optionId, '@title' => isset($optionDefinition['title']) ? $optionDefinition['title'] : '']));
It should be replaced by
$this->messenger()->addError(t("Option definition, @option (@title), does not define a plugin id", ['@option' => $optionId, '@title' => isset($optionDefinition['title']) ? $optionDefinition['title'] : '']));
If not we get the following error:
Call to a member function addError() on null in Drupal\layout_options\Plugin\Layout\LayoutOptions->getOptionPlugin()
Steps to reproduce
- Define a [provider].layout_options.yml with a not existing plugin.
- Access to the LB page.
- The error is thrown.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | layout_options-3167630.patch | 1.16 KB | jlbellido |
Comments
Comment #2
jlbellidoHello,
I am providing a first patch to solve this issue.
In addtion, I've reviewed other possible cases but I didn't find any.
Cheers.
Comment #4
cgmonroe commented