Matrix blocks can be initially propagated with the wrong site’s content
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 705
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 134
Description
@brandonkelly Thanks for the fix! Couldn't see any loss now, but it seems things can go wrong when done in a wrong sequence.
Example (same site settings from #6441):
Entry exists in berlin_de and berlin_en with translated content
a) select berlin_de, add new site munich_de => matrix blocks are propagated, field correctly has the german content
b) select berlin_en, add new site munich_de => matrix blocks are propagated, but field has english content. (so have other translateble fields too)
Looks like content is always propagated from the currently selected site and the fields translation settings are not respected.
Shoudn't be a problem in 'one-dimensional' site settings (german,english,italian/translated by language OR berlin,munich,kleinfinstenich/not translated), but in 'multi-dimensional' settings, unless you enforce a very strict workflow (first add sites, then add content)
(add translate by site group to the mix :-) )
Originally posted by @wsydney76 in https://github.com/craftcms/cms/issues/6441#issuecomment-663844084
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two site-creation sequences using the same site settings referenced from #6441, comparing the initial Matrix block content and other translatable fields. No source file or test is named; done means the reported sequence no longer initializes the new site's fields from the wrong selected site's content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, content
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100