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

Command icon 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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mariacha1 created an issue. See original summary.

mariacha1’s picture

Version: 6.1.3 » 6.1.x-dev
Status: Active » Needs review

  • 23c8304 committed on 6.1.x
    Issue #3271315 by mariacha1: InvalidArgumentException while trying to...
jrockowitz’s picture

Status: Needs review » Fixed

  • 23c8304 committed on 6.x
    Issue #3271315 by mariacha1: InvalidArgumentException while trying to...

  • 23c8304 committed on 6.2.x
    Issue #3271315 by mariacha1: InvalidArgumentException while trying to...

Status: Fixed » Closed (fixed)

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