Problem/Motivation
I'm having an issue using the explode tamper to map to a taxonomy. In my use case, I have a feed definition setup that uses the Feed: Title as the source and then use the explode tamper to map the title to a specific taxonomy.
I have about 30 different feeds that use the same feed definition but the data on the feed is unique in terms of how it should be associated to the taxonomy.
A sample feed name might be: Lehigh|Activities or Lehigh|Residence Camp. The goal is to get the first instance to be associated with the taxonomy terms: Lehigh & Activities, and Lehigh & Residence Camp for the second instance.
There could be more then two terms in the feed name.
The taxonomy is setup to automatically create entities and the taxonomy field is configured to have an unlimited amount of terms.
I have the Explode tamper setup under the appropriate Feeds data. I'm using a | as the string separator and the limit is blank.
When I go to import the feed, I am getting the following error on the screen:
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /batch?id=117&op=do_nojs&op=do
StatusText: error
ResponseText: The website encountered an unexpected error. Try again later.TypeError: trim(): Argument #1 ($string) must be of type string, array given in trim() (line 269 of modules/contrib/feeds/src/Feeds/Target/EntityReference.php). Drupal\feeds\Feeds\Target\EntityReference->prepareValue() (Line: 117)
Drupal\feeds\Feeds\Target\EntityReference->setTarget() (Line: 1418)
Drupal\feeds\Feeds\Processor\EntityProcessorBase->map() (Line: 302)
Drupal\feeds\Feeds\Processor\EntityProcessorBase->process() (Line: 128)
Drupal\feeds\EventSubscriber\LazySubscriber->Drupal\feeds\EventSubscriber\{closure}() (Line: 206)
Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (Line: 56)
Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (Line: 41)
Drupal\feeds\FeedsExecutable->dispatchEvent() (Line: 267)
Drupal\feeds\FeedsExecutable->doProcess() (Line: 111)
Drupal\feeds\FeedsExecutable->processItem() (Line: 297)
_batch_process() (Line: 139)
_batch_do() (Line: 95)
_batch_page() (Line: 52)
Drupal\system\Controller\BatchController->batchPage()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 593)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 50)
Drupal\ban\BanMiddleware->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 49)
Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 709)
Drupal\Core\DrupalKernel->handle() (Line: 19)
I am using Feeds v8.x-3.0, Feeds Tamper v8.x-2.0-beta4, Tamper v8.x-1.0-beta1, and Drupal 11.1.6.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes