Problem/Motivation
When indexing the rendered output of pages for something like solr using drush, I'm getting this notice:
[error] InvalidArgumentException while trying to render item entity:node/XXX:en with view mode default for search index Content: Route required in Drupal\Core\Url::fromRouteMatch() (line 168 of /code/web/core/lib/Drupal/Core/Url.php).
That's because the help block in webform_help wants to check to see if you're on a webform page, but I guess if you're indexing through drush there is no route provided...
Steps to reproduce
1. Enable "webform"
2. Enable the "help" module
3. Set up the site to index a rendered version of your content using search_api
4. Run "drush sapi-i"
5. See the Notices.
Proposed resolution
It's the same solution as https://www.drupal.org/project/webform/issues/3158332 -- just add a check to bail out if there's no route provided. I'll get a patch or merge request up shortly.
Remaining tasks
Submit a patch
User interface changes
- None -
API changes
- None -
Data model changes
- None -
Issue fork webform-3271315
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 #3
mariacha1 CreditAttribution: mariacha1 at ThinkShout commentedMerge request open with patch visible at https://git.drupalcode.org/project/webform/-/merge_requests/163.diff
Comment #5
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented