Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different Matrix Block Types are merged together #1184

Closed
ivanBereznev opened this issue Aug 31, 2022 · 2 comments · Fixed by ivanBereznev/feed-me#1
Closed

Different Matrix Block Types are merged together #1184

ivanBereznev opened this issue Aug 31, 2022 · 2 comments · Fixed by ivanBereznev/feed-me#1
Assignees
Labels

Comments

@ivanBereznev
Copy link

Description

Let's imagine that there is a Matrix field myMatrix with two possible block types blocktypea and blocktypeb.
Then, blocks for this field should be imported from a JSON source using Feed Me. (Though it does not have to be JSON, I am pretty sure that the same can be reproduced with any source)
The JSON data looks like:

{
  "data": [
    {
      "title": "Entry A",
      "myMatrixDataA": [
        {
          "someBlockField": "someValue1"
        }
      ],
      "myMatrixDataB": [
        {
          "someOtherBlockField": "someValue2"
        }
      ]
    }
  ]
}

Fields from myMatrixDataA are mapped to fields of blocktypea, and ones from myMatrixDataB are mapped to blocktypeb.

I expect that import of such feed should create two different blocks in the entry, but instead it only creates the blocktypeb block.

Steps to reproduce

  1. Set up a field according to the description above.
  2. Add the field to an entry section
  3. Create a feed that imports a data source with format like the one described above.
  4. Try to import an entry

NOTE: probably #689 describes the same issue, but I am not sure.

Additional info

  • Craft version: 3.7
  • PHP version: 7.3
  • Database driver & version: PostgreSQL 13
  • Plugins & versions: Feed Me 4.4.1.1
ivanBereznev added a commit to ivanBereznev/feed-me that referenced this issue Aug 31, 2022
ivanBereznev added a commit to ivanBereznev/feed-me that referenced this issue Sep 1, 2022
craftcms#1184 Different Matrix Block Types are merged together
@ivanBereznev ivanBereznev reopened this Sep 1, 2022
@i-just i-just self-assigned this Feb 9, 2023
angrybrad added a commit that referenced this issue Feb 11, 2023
commit 6278531
Author: Ivan Bereznev <ivan.bereznev@actimind.com>
Date:   Wed Aug 31 18:58:42 2022 +0300

    #1184 Different Matrix Block Types are merged together
@angrybrad
Copy link
Member

Resolved in b7c5c9e, 8931ff6, and 0a53020

thanks!

@brandonkelly
Copy link
Member

Feed Me 5.1.0 has been released with the fix for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants