When trying to chain the Entity Finder plugin onto an array, it doesn't appear possible to do so. See error:
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /en/batch?id=303&op=do_nojs&op=do
StatusText: error
ResponseText: The website encountered an unexpected error. Try again later.Drupal\Core\Database\InvalidQueryException: Calling Drupal\Core\Database\Query\Condition:: condition() without an array compatible operator is not supported. See https://www.drupal.org/node/3350985 in Drupal\Core\Database\Query\Condition->condition() (line 115 of core/lib/Drupal/Core/Database/Query/Condition.php). Drupal\Core\Database\Query\Select-
>condition ( 'node__field_example_id.field_example_id_value', Array, NULL) (Line: 77)
Drupal\Core\Entity\Query\Sql\Condition->compile(Object) (Line: 177)
Drupal\Core\Entity\Query\Sql\Query->compile() (Line: 82)
Drupal Core VEntity Query 5a1Query-compt el) (ne: 356 bject) (Line: 120
Drupal\tamper\Plugin\Tamper\EntityFinder->tamper(Array, Object) (Line: 120)
rupal\feeds_tamper\EventSubscriber\FeedsSubscriber->alterItem(Object, Object, Array) (Line: 78
Drupal\ feeds_tamper\EventSubscriber\FeedsSubscriber-›afterParse(Object, 'feeds parse', Object) (Line: 246)
Symfony\Component\EventDispatcher\EventDispatcher: :Symfony\Component\EventDispatcher\{closure} (Object,
'feeds parse', Object) (Line: 206)
Symfony\Component\EventDispatcher\EventDispatcher->callListeners(Array, 'feeds-parse', Object) (Line: 56)
Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object, 'feeds parse') (Line: 41)
Drupal\ feeds\FeedsExecutable->dispatchEvent('feeds-parse', Object) (Line: 243)
Drupal\feeds\FeedsExecutable->doParse(Object, Object) (Line: 107)
Drupal\ feeds\ FeedsExecutable->processItem(Object,
'parse', Array, Array) (Line: 297)
Modify the Entity Finder plugin's tamper() method to handle both array and non-array inputs properly. The specific change is to modify the return statement to maintain the array structure when the input is an array
Apply the proposed patch, write tests and review
N/A
The Entity Finder plugin's tamper() method will now return an array of entity IDs when given an array input, instead of just the first entity ID.
N/A
Active
1.0
Code