Problem/Motivation

I created 2 mappings. Each of these mappings was configured to map a paragraph (see https://www.drupal.org/project/paragraphs) to a Salesforce object. I'll call these mappings Mapping 1 and Mapping 2.

Mapping 1 was configured for paragraphs of bundle Bundle 1.

Mapping 2 was configured for paragraphs of bundle Bundle 2.

When I went and updated an entity that had references to paragraphs of Bundle 1 and Bundle 2, an exception was being thrown saying:

"Field $name is unknown."

Digging into it, it looked like fields defined in Bundle 1 were trying to be extracted from a paragraph entity of Bundle 2 (which did not have these fields defined).

Proposed resolution

The query to get the mappings for a specific entity type does not account for bundle. This was causing Mapping 1 to run on paragraphs of Bundle 2. Vice versa, Mapping 2 would run on paragraphs of Bundle 1. So we just need to update that query to include the bundle.

Remaining tasks

Will attach a patch. Please review, comment, etc.

Comments

rvillan created an issue. See original summary.

rvillan’s picture

Title: Bundle setting is not respected » Mapping bundle setting is not respected
rvillan’s picture

Issue summary: View changes
rvillan’s picture

Issue summary: View changes
rvillan’s picture

Issue summary: View changes
rvillan’s picture

Actually, looks like the dev version already attempted to fix it. But it doesn't look like it's correctly extracting the bundle? Patch attached.

  • aaronbauman committed 4493a8d on 8.x-3.x authored by rvillan
    Issue #2921712 by rvillan: Mapping bundle setting is not respected
    
aaronbauman’s picture

Status: Active » Fixed

Thanks for the patch - this is in.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.