2

I've posted an issue on the FeedMe repo, but I'm not sure whether that's the correct place for it. Also, there are quite a few issues on there with no reply for a few weeks.

The problem I'm having is I'm importing some data from an EE channel that contains a fluid field into a Craft section that has a matrix field and some of the data isn't being imported and the order of rows is wrong too. This is an example of what I'm trying to import:

<?xml version="1.0" encoding="UTF-8"?>
<entries>
  <entry>
    <count>1</count>
    <total_results>1</total_results>
    <unique>166</unique>
    <author>email@gmail.com</author>
    <title><![CDATA[Newsletter - October 2017]]></title>
    <url_title>newsletter-october-2017</url_title>
    <entry_id>166</entry_id>
    <entry_date>1506996780</entry_date>
    <status>1</status>
    <summary><![CDATA[<p>October appears to be…</p>]]></summary>
    <forumThread></forumThread>
    <coverImage></coverImage>
    <modularContent>
      <blockHeading><![CDATA[News 1]]></blockHeading>
      <blockContent><![CDATA[<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iure rerum in tempore sit ducimus doloribus quod commodi eligendi ipsam porro non fugiat nisi eaque delectus harum aspernatur recusandae incidunt quasi.</p>]]></blockContent>
      <blockHeading><![CDATA[News 2]]></blockHeading>
      <blockContent><![CDATA[<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iure rerum in tempore sit ducimus doloribus quod commodi eligendi ipsam porro non fugiat nisi eaque delectus harum aspernatur recusandae incidunt quasi.</p>]]></blockContent>
      <blockHeading><![CDATA[Modding News]]></blockHeading>
      <blockImage>https://www.domain.com/images/content/news/image1.jpg</blockImage>
      <blockContent><![CDATA[<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iure rerum in tempore sit ducimus doloribus quod commodi eligendi ipsam porro non fugiat nisi eaque delectus harum aspernatur recusandae incidunt quasi.</p>]]></blockContent>
      <blockHeading><![CDATA[News 3]]></blockHeading>
      <blockContent><![CDATA[<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iure rerum in tempore sit ducimus doloribus quod commodi eligendi ipsam porro non fugiat nisi eaque delectus harum aspernatur recusandae incidunt quasi.</p>]]></blockContent>
      <blockImage>https://www.domain.com/images/content/news/image2.jpg</blockImage>
      <blockContent><![CDATA[<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iure rerum in tempore sit ducimus doloribus quod commodi eligendi ipsam porro non fugiat nisi eaque delectus harum aspernatur recusandae incidunt quasi.</p>]]></blockContent>
    </modularContent>
  </entry>
</entries>

With the above, the matrix field is being populated with all of the images first, then all of the text content, and none of the headings.

I'm pretty sure all the mapping is correct. The heading block shows up and I've assigned it to blockHeading.

I'm also getting the following error relating to the date:

News: Date parse error: 1506996780 - Could not parse '1506996780': DateTime::__construct(): Failed to parse time string (1506996780) at position 8 (8): Unexpected character.

In EE, that's being output by <entry_date>{entry_date}</entry_date> which is the same as a feed template I did for another channel that imports in Craft with no errors.

1
  • The date formatting issue is solved by getting EE to output dates in one of the formats that FeedMe specifies like mm/dd/yyyy rather than choosing auto.
    – Tyssen
    Apr 16, 2021 at 0:18

1 Answer 1

1

So the answer was that each of my blocks needed to be wrapped by another element, e.g.

<modularContent>
  <block><blockHeading><![CDATA[News 1]]></blockHeading></block>
  <block><blockContent><![CDATA[<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iure rerum in tempore sit ducimus doloribus quod commodi eligendi ipsam porro non fugiat nisi eaque delectus harum aspernatur recusandae incidunt quasi.</p>]]></blockContent></block>
</modularContent>

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.