Problem/Motivation

When reviewing the configuration synchronisation old values are visible in the export

Steps to reproduce

1. Feeds
2. Paragraphs
3. Create a variety of fields. Entity reference and text
4. Create a feed
5. create a mapping
6. edit the mapping
7. export configuration admin/config/development/configuration/single/export

In this example, the field is an entity reference. This means that target_id is the value and I am guessing value: is superfluous.

target: 'field_para_issuer_information.entity:paragraph.field_bond_issuer'
    map:
      target_id: issuerid
      value: refipercent
    settings:
      language: null
      reference_by: title
      autocreate: false
      feeds_item: false

Proposed resolution

Reviewing code to check whether the it needs to be cleaned up in MappingForm or the mapper.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#4 feeds-mapping-target-id-chain.png215.11 KBinterlated
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

interlated created an issue. See original summary.

MegaChriz’s picture

Status: Active » Postponed (maintainer needs more info)

Hm. For entity reference targets I am using, I see only 'target_id' in the mapping configuration, not 'value'. What kind of field is field_bond_issuer? A reference to a paragraph? A reference to a taxonomy term?

Can you expand the steps to reproduce with a bit more detail? For example:

  1. On the node entity type, create an entityreference field called "field_para_issuer_information", referencing a paragraph.
  2. On the paragraph entity type, create an entityreference field called "field_bond_issuer", referencing a taxonomy term.
  3. (...)
  4. Create a feed type for importing paragraphs. Map "issuerid" to "field_bond_issuer", reference by title.

You say there's also a text field involved in this process. On which entity type that field is created? On the paragraph? On the node?

interlated’s picture

Could be caused by hacked version of feeds_para_mapper https://www.drupal.org/project/feeds_para_mapper/issues/3255360. If you haven't seen it then must be this mapper. Doesn't seem to affect functionality.

Issuer (field_bond_issuer) is an 'entity reference' to another node. The entity reference is in a paragraph (field_para_issuer_information)

I've got a lot of these examples.

target: 'field_para_green_eligibility.entity:paragraph.field_bond_pend_excl_summary'
    map:
      value: pendingexclusionreasonmain
      target_id: bondtype
    settings:
      language: null
    unique: {  }

field_bond_pend_excl_summary is a plain text field, meaning that the relevant mapping is 'value: pendingexclusionreasonmain' in my view.

Or boolean

target: 'field_para_green_eligibility.entity:paragraph.field_bond_is_spo'
    map:
      value: spoyn
      target_id: uw
    settings:
      language: null
interlated’s picture

I noticed this chain. Once a reference item is found, the target_id is set to that value until the next reference is found

Chain of values

interlated’s picture

I cleaned the configuration to determine if the problem reappears. It hasn't yet.