Skip to content

[5.x]: Matrix Blocks are not saved to new languages of an entry #16640

@kamejosh

Description

@kamejosh

What happened?

Description

I maintain a website based on craft which relies heavily on nested Matrix Blocks (it's Craft 5 latest). And has multiple Languages/Sites. This works fine when I create a new Entry, I add a new Block and this block is now available on all different sites.
But when I add a new Language/Site and I also want to have all entries available for this site this does no longer work.
First I go in to all sections and make the new site available there, next I go to an entry and add the entry for the new site.

Now when I save the Entry is available for the new Site but it doesn't have all the block elements. This would be manageable if not for another issue:
When I now create the block elements on the new Site of the Entry, the same blocks are also created in all other languages, which is not what I want, I want all languages/sites to follow the same structure, like when I setup a new entry.

The only workaround once this has happened, is to deleted every block and recreate everything. Which is not great.

There is another way to prevent this from happening but it's not very intuitive, once I add the new site and before I hit save for the first time, I need to mark every block element as changed (go into the deepest block and add a space or flip a switch) when now everything is marked as changed (blue border on the left) the new site also gets all the content elements. But this is not the way I think this is supposed to be done.

my sections have "Let each entry choose which sites it should be saved to"

Image

my matrix blocks have "Save entries to all sites the owner element is saved in"

Image

my elements have "Translate for each site" where applicable

Image

Steps to reproduce

  1. Have a multi language site

Image

  1. create an entry with nested matrix blocks in a single language
  2. add a second language to the entry
  3. save the entry

Expected behavior

The nested matrix blocks are saved to the new language

Actual behavior

The nested matrix blocks are sometime saved to the new language

new language entry:

Image

existing language entry:

Image

Craft CMS version

Craft Pro 5.5.6.1

PHP version

8.3.16

Operating system and version

Darwin 24.3.0

Database type and version

MySQL 8.1.0

Image driver and version

GD 8.3.16

Installed plugins and versions

AsyncQueue 4.0.0
CKEditor 4.4.0
Developion Q-Point 0.1.0
Elements Panel 3.0.0
Friendly Captcha 3.0.1
Knock Knock 3.0.1
Navigation 3.0.5
oEmbed 3.1.3
SEOmatic 5.1.7
Smith 3.1.0
Vite 5.0.1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions