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

fix for importing inner element fields #1383

Merged
merged 2 commits into from
Nov 25, 2023

Conversation

i-just
Copy link
Contributor

@i-just i-just commented Nov 17, 2023

Description

Commit 27dac31 fixed an issue where matrix element inner fields were using the first set of data for all elements, but it broke “simple” inner element field import. This PR fixes it while keeping the inner fields for elements in a matrix field working as expected.

Related issues

#1378

@fgd007
Copy link

fgd007 commented Nov 18, 2023

Awesome @i-just, works! 🙏

@fgd007
Copy link

fgd007 commented Nov 18, 2023

Unfortunately, on further inspection, it didn't seem to do exactly the right thing.
For me content for the assets got mixed up.

In a matrix field with this (pseudo)structure below it will mix up the 'fields'-index with 'fields filtered by asset matrix block'-index.

Resulting in a caption 'Lorem 2' on the first asset field (Field index 1, Asset index 1).
I'm not sure if this has to do with your fix or whether this is unrelated.

{
  "fields": [
    {
      "Text": "Lorem ipsum"
    },
    {
      "ImageUrl": "https://url",
      "Caption": "Lorem 1"
    },
    {
      "Text": "Lorem ipsum"
    },
    {
      "ImageUrl": "https://url",
      "Caption": "Lorem 2"
    },
    {
      "Text": "Lorem ipsum"
    },
    {
      "ImageUrl": "https://url",
      "Caption": "Lorem 3"
    }
  ]
}

@i-just
Copy link
Contributor Author

i-just commented Nov 20, 2023

@fgd007 can you please open a new issue about this and provide reproduction steps? The structure of your matrix field and an example of your feed snippet would be very helpful.

@angrybrad angrybrad merged commit 146e46b into v4 Nov 25, 2023
5 checks passed
@angrybrad angrybrad deleted the bugfix/1378-importing-nested-element-fields branch November 25, 2023 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants