In the "URL field" processor's addFieldValues() method, we currently have the following code:

      $fields = $this->getFieldsHelper()
        ->filterForPropertyPath($item->getFields(), NULL, 'search_api_url');
      foreach ($fields as $field) {
        if (!$field->getDatasourceId()) {
          $field->addValue($url->toString());
        }
      }

The if check in the foreach loop is unnecessary, as filterForPropertyPath() will already check for that (NULL there is treated as any other $datasource_id, not as "all values").

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drunken monkey created an issue. See original summary.

drunken monkey’s picture

Status: Active » Needs review
FileSize
627 bytes
drunken monkey’s picture

borisson_’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me, thanks @drunken monkey!

  • drunken monkey committed 5d2179b on 8.x-1.x
    Issue #2881945 by drunken monkey: Removed unnecessary check in AddURL::...
drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

Good to hear, thanks for reviewing!
Committed.

Status: Fixed » Closed (fixed)

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