-
Notifications
You must be signed in to change notification settings - Fork 139
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
Translatable fields in Matrix are set for all languages. #1537
Comments
This has come up a couple times before (#463, #634). It’s currently working as expected, as Feed Me doesn’t have a way of identifying existing nested Matrix entries. So it will wipe out all existing nested entries for the field on each import, and recreate them based on the import data. The way to work around that is to set your Matrix field’s Propagation Method to “Only save entries to the site they were created in”, so only the current site’s entries get removed/recreated during the import. That said, we’re going to look into making it possible to import nested entries directly via their own import job, via new “Field” and “Owner Element” entry import settings. That way you’ll be able to match incoming nested entry data against existing entries, and update them if they already exist, like any other entry import. |
Hmm. Is there no way to check for a site Id on a nested entry? As normal text fields do this? |
It already does only re-import the nested entries based on the site ID. However, if the Matrix field’s propagation method is set to “Save blocks to all sites the owner element is saved in”, then all sites share the same set of nested entries. So when Feed Me deletes the existing nested entries so new ones can be imported, those nested entries will get deleted for all the sites they belong to. Which is why the current solution here is that you change your propagation method to “Only save entries to the site they were created in”. Then, when Feed Me deletes the existing nested entries, it’s only deleting them for that one site, leaving the other sites’ nested entries in-tact. |
“Save blocks to all sites the owner element is saved in” would lead to: the user has to upload every picture, every cta, every not-translatable matrix field multiple times - for every language. |
Description
When I have a translatable field in a matrix-block feed-me will overwrite the content of this field for all languages.
When importing content to matrix-blocks, feed-me doesn't seem to check for the chosen target site.
(Matrix-Block Propagation Method: "Save entries to all sites the owner element is saved in")
Steps to reproduce
Additional info
Logs from database:
Job for site=craftDe:
{"Match existing element with data
{"idorig":"65"}
."}{"Existing element [
#41
] (https://craft.test/cmsadm/entries/sectionWebsite/41-freie-stellen?site=craftDe) found."}{"Data to update for
matrixContent
:{"new1":{"type":"headline","enabled":true,"collapsed":false,"fields":{"headline":"Freie Stellen"}}}
."}{"Data ready to import
{"title":"Freie Stellen","matrixContent":{"new1":{"type":"headline","enabled":true,"collapsed":false,"fields":{"headline":"Freie Stellen"}}},"idorig":"65","headline":"Freie Stellen"}
."}{"Entry [
#41
] (https://craft.test/cmsadm/entries/sectionWebsite/41-freie-stellen?site=craftDe) updated successfully."}Job for site=craftEn:
{"Match existing element with data
{"idorig":"65"}
."}{"Existing element [
#41
] (https://craft.test/cmsadm/entries/sectionWebsite/41-freie-stellen?site=craftEn) found."}{"Data to update for
matrixContent
:{"new1":{"type":"headline","enabled":true,"collapsed":false,"fields":{"headline":"Vacancies"}}}
."}{"Data ready to import
{"title":"Vacancies","matrixContent":{"new1":{"type":"headline","enabled":true,"collapsed":false,"fields":{"headline":"Vacancies"}}},"idorig":"65","headline":"Vacancies"}
."}{"Entry [
#41
] (https://craft.test/cmsadm/entries/sectionWebsite/41-freie-stellen?site=craftEn) updated successfully."}Guess as matrix-blocks are more or less entries by itself they also have to be checked for siteId.
The text was updated successfully, but these errors were encountered: