Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When changing the plugin for tips into a non-existing one like
id: front
...
tips:
front-page:
id: front-page
plugin: text_unknown
the exception reported is
Error message
Drupal\Component\Plugin\Exception\PluginException: Unknown tip plugin ID 'front'. in Drupal\tour\TipsBag->initializePlugin() (line 77 of /Users/clemens/Sites/drupal/d8/www/core/modules/tour/lib/Drupal/tour/TipsBag.php).
It should report the plugin and the tip IDs as
Error message
Drupal\Component\Plugin\Exception\PluginException: Unknown tip plugin ID 'text_unknown' for 'front-page'. in Drupal\tour\TipsBag->initializePlugin() (line 77 of /Users/clemens/Sites/drupal/d8/www/core/modules/tour/lib/Drupal/tour/TipsBag.php).
Attached patch fixes this.
Comment | File | Size | Author |
---|---|---|---|
tour-plugin-exception.patch | 1.33 KB | clemens.tolboom | |
Comments
Comment #3
clemens.tolboom@alansaviolobo this needs a manually test for what happens when a tour writer make a typo writing a tour.
Comment #14
quietone CreditAttribution: quietone at PreviousNext commentedThe code in the patch was removed in #2246647: Rename PluginBag to LazyPluginCollection. I reckon this is now outdated.
If this is incorrect reopen the issue, by setting the status to 'Active', and add a comment explaining what still needs to be done.
Thanks!