<p>Nevermind, issue found - bug in Feedme when using a custom source. Switched the field back to running off a standard section and it appears to work now.</p>

CC BY-SA 4.0
2023-02-20T13:35:51.280Z
2023-02-20T13:35:51.280Z
Neokoenig
<p>I'm trying to import via JSON in feedMe, but entries aren't being matched for an entries field:</p>
<p>An <code>EntryType:Song</code> has a custom entries field of <code>EntryType:SourceTexts</code></p>
<p>A <code>Song</code> has an additional custom field of <code>legacySongId</code></p>
<p>A <code>SourceText</code> has an additional custom field of <code>legacyTranslationId</code></p>
<p>The source texts and songs already exist, and I'm just trying to get the relationship in.</p>
<p><strong>Example JSON Import</strong></p>
<pre><code>[
{
    &quot;sourcetexts&quot;: [
        4872
    ],
    &quot;songid&quot;: 3680
},
{
    &quot;sourcetexts&quot;: [
        7794
    ],
    &quot;songid&quot;: 3681
},
{
    &quot;sourcetexts&quot;: [
        4875
    ],
    &quot;songid&quot;: 3682
},
{
    &quot;sourcetexts&quot;: [
        4874
    ],
    &quot;songid&quot;: 3683
},
{
    &quot;sourcetexts&quot;: [
        4873
    ],
    &quot;songid&quot;: 3684
},
{
    &quot;sourcetexts&quot;: [
        4813,
        5363
    ],
    &quot;songid&quot;: 3686
},
{
    &quot;sourcetexts&quot;: [
        4814,
        5364
    ],
    &quot;songid&quot;: 3687
}]
</code></pre>
<p><strong>Relevant Feedme Mapping:</strong></p>
<p><a href="https://i.sstatic.net/WSCjc.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/WSCjc.png" alt="Relevant Feedme Mapping" /></a></p>
<p>No other fields are imported.</p>
<p><strong>Example Log File</strong></p>
<pre><code>info    Source Song Texts: Starting processing of node #4228.Show detail    19/02/2023 15:29
info    ↳ Source Song Texts: Match existing element with data {&quot;legacySongId&quot;:6871}.    19/02/2023 15:29
info    ↳ Source Song Texts: Existing element #22674 found. 19/02/2023 15:29
info    ↳ Source Song Texts: Search for existing entry with query {&quot;status&quot;:null,&quot;sectionId&quot;:[null],&quot;limit&quot;:null,&quot;where&quot;:[&quot;=&quot;,&quot;field_legacyTranslationId_btjcagql&quot;,7786]}   19/02/2023 15:29
info    ↳ Source Song Texts: Found 0 existing entries: []   19/02/2023 15:29
info    ↳ Source Song Texts: Node #4228 skipped. No content has changed.
</code></pre>
<p>I'm sure this has worked before... It just can't find the entries by that legacy id for some reason.. Ideas?</p>

<plugin-feedme>
Issue matching entries when importing into FeedMe with Craft4
# Issue matching entries when importing into FeedMe with Craft4

(Asked by: username_0 on 2023-02-19)

I'm trying to import via JSON in feedMe, but entries aren't being matched for an entries field:
An EntryType:Song has a custom entries field of EntryType:SourceTexts
A Song has an additional custom field of legacySongId
A SourceText has an additional custom field of legacyTranslationId
The source texts and songs already exist, and I'm just trying to get the relationship in.
Example JSON Import
[
{
    "sourcetexts": [
        4872
    ],
    "songid": 3680
},
{
    "sourcetexts": [
        7794
    ],
    "songid": 3681
},
{
    "sourcetexts": [
        4875
    ],
    "songid": 3682
},
{
    "sourcetexts": [
        4874
    ],
    "songid": 3683
},
{
    "sourcetexts": [
        4873
    ],
    "songid": 3684
},
{
    "sourcetexts": [
        4813,
        5363
    ],
    "songid": 3686
},
{
    "sourcetexts": [
        4814,
        5364
    ],
    "songid": 3687
}]

Relevant Feedme Mapping:

No other fields are imported.
Example Log File
info    Source Song Texts: Starting processing of node #4228.Show detail    19/02/2023 15:29
info    ↳ Source Song Texts: Match existing element with data {"legacySongId":6871}.    19/02/2023 15:29
info    ↳ Source Song Texts: Existing element #22674 found. 19/02/2023 15:29
info    ↳ Source Song Texts: Search for existing entry with query {"status":null,"sectionId":[null],"limit":null,"where":["=","field_legacyTranslationId_btjcagql",7786]}   19/02/2023 15:29
info    ↳ Source Song Texts: Found 0 existing entries: []   19/02/2023 15:29
info    ↳ Source Song Texts: Node #4228 skipped. No content has changed.

I'm sure this has worked before... It just can't find the entries by that legacy id for some reason.. Ideas?

**Tags:** plugin-feedme

---

## 1 answers

### Answer by username_0 on 2023-02-20. Score: 1

Nevermind, issue found - bug in Feedme when using a custom source. Switched the field back to running off a standard section and it appears to work now.


---

