Avoid setting a value to an item when source is missing

Created on 18 June 2024, 5 months ago

Problem/Motivation

Creating as postponed as this is dependent / relevant on changes in feed module for Feeds "update existing" - how to avoid wiping out all existing data? Active

I have one remaining issue and that is with fields with that have tampers applied to them.

When feeds tamper runs for a missing source it passes NULL to the tamper plugins.

If it either receives NULL back from the tamper plugins on L126 or if we have the SkipOnEmpty plugin causing NULL to be set on L131 here then the item suddenly have a NULL source value an sets this to the field.

This is more complicated to solve, as I have things like the default value plugin to provide values for things that are always missing, but also have had to use SkipOnEmpty as lot due to working around issues summarised in #3332785: Improve handling of empty data

https://www.drupal.org/project/feeds/issues/3162496#comment-15625719 Feeds "update existing" - how to avoid wiping out all existing data? Active

Steps to reproduce

  • Use patch from Improve handling of empty data Needs review
  • Create a feed with tampers on fields where the source is missing
  • Add skip on empty plugin
  • Observe the field is treated as NULL instead of empty when a tamper plugin is applied

Proposed resolution

Only set a NULL value when one exists.

Remaining tasks

Postponed on Feeds "update existing" - how to avoid wiping out all existing data? Active

User interface changes

n/a

API changes

n/a

Data model changes

n/a

Feature request
Status

Postponed

Version

2.0

Component

Code

Created by

🇳🇿New Zealand ericgsmith

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

Comments & Activities

Production build 0.71.5 2024