feed-me
feed-me copied to clipboard
Different Matrix Block Types are merged together
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
- Set up a field according to the description above.
- Add the field to an entry section
- Create a feed that imports a data source with format like the one described above.
- Try to import an entry
NOTE: probably https://github.com/craftcms/feed-me/issues/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