1

According to the CraftCMS FeedMe 4 docs we should be able to import inner element field data when importing content via FeedMe.

I have a section we'll call Parent, which has two fields that need importing; ImportId (text field) and ChildEntry (Entry relationship). Child Entry has two fields, Title and Body.

I am able to map Parent->ImportId and ChildEntry->Title I am unable to map to ChildEntry->Body.

My JSON looks like this:


{
  "data": [
    {
      "title": "secrets",
      "import_id": "UUID-9-3/4",
      "child_title": "Harry Potter",
      "child_message": "Is in a dream",
    },
    ...
  ]
}

Is this expected functionality, or am I reading the documentation correctly?

  • What type of field is ChildEntry->Body? Could it be that this is not a text field (but a Matrix field for instance), and therefore FeedMe can not use it for import? – Paul Apr 16 '19 at 9:19
  • It's a rich text field. – Philip Zaengle Apr 18 '19 at 12:54
  • This should work, I just did that recently. Would you share a bit more Information? Maybe a Screenshot of the current Setup? – Max Strebel Apr 26 at 11:11
1

You should nest the child's details like so:

{
    "data": [
        {
            "title": "secrets",
            "import_id": "UUID-9-3/4",
            "child": {
                "child_title": "Harry Potter",
                "child_message": "Is in a dream"
            }
        }
    ]
}

Then make sure you you choose data as your Primary Element when mapping your feed and check Create entries if they do not exist for the relational field.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.