Multiple feeds_item values not saved, when feeds_item.guid or feeds_item.url used in mapping.

Created on 20 January 2023, almost 2 years ago
Updated 28 January 2023, almost 2 years ago

Problem/Motivation

Functin setTarget in Drupal\feeds\Feeds\Target\FeedsItem saves only first feeds_item.

Processing second feed 19 value feeds_item is initiatized in target entity
Array (
[0] => Array ( [target_id] => 18 [imported] => 1674223479 [url] => [guid] => 1 [hash] => 8458519be9eca51cb75024caba2d59ad )
[1] => Array ( [target_id] => 19 [hash] => cb7665c2d9a57e09fa0d452766f3634d )
)

When feeds_item.guid is used in feeds mapping, setTarget gets $values
Array (
[0] => Array ( [guid] => 1 )
)

Merges new values to first current feeds_item
$values = array_merge($item_list->getValue()[0], $values[0]);
Array ( [target_id] => 18 [imported] => 1674223479 [url] => [guid] => 1 [hash] => 8458519be9eca51cb75024caba2d59ad )

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇨🇿Czech Republic Xperd

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024