This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Support Matrix + Super Table nested importing #470
Comments
i was using feedme to import into a super table inside a matrix and it only imported the first row of each supertable in a matrix block. wondering what the best workaround would be until this is working. thanks! |
Is there a solution for this? We wont be able to use super table inside a matrix if we can import into it. At the moment it creates a separate matrix entry with a ingle super table row in each, instead of one matrix entry and multiple super table rows. Thanks |
The problem is because the $parsedValue array only contains one super table row to import. Super Table like Matrix takes arrays like:
But actually only the first or last one is returned, so there is only one new array, not all of them. So I aded this dirty hack to get it working. I just create a new parsedValue array with all the rows like above. This would not be the clean solution needed, but its got it working for me in case anyone else needs a quick solution: Replace this line 113 in vendor/craft/feed-me/src/fields/Matrix.php: With this code
|
@amityweb Your code worked great! I just needed to place |
This fix also worked for me. Thanks a lot @amityweb! Is this a FeedMe bug? Or is there another way to format my JSON to get this to work? I love that it's working now... but I'm not too keen on hacking a plugin like this... |
Not necessarily a bug, I dont think its supported yet. In fact you can see Brandon added the enhancement label, so its on their list to do I hope. Shouldn't take too long now I've highlighted the issue to be honest. More elegant code will probably be used though :) I don't like hacking either but lucky for me its a one off import on site migration from WP to Craft. So now its done I don't need anymore, so I didnt mind hacking it to get it to work. In fact I had to, we had way too much content for me to copy and paste and not use Feedme. |
Applying the fix described in this issue: craftcms#470
About to try using the code above for our data import. Would love to see this prioritized into the actual codebase! |
We've hit an edge case and I'm looking for support/help/insight.
apart from this, fields in each block are identical When importing, an image belonging to
We're already resetting |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
No description provided.
The text was updated successfully, but these errors were encountered: