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

Matrix blocks are no longer propagating across site entries on first save #4449

Closed
mmikkel opened this issue Jun 26, 2019 · 1 comment
Closed

Comments

@mmikkel
Copy link
Contributor

mmikkel commented Jun 26, 2019

Description

Since Craft 3.0.27, Matrix fields that are set to manage blocks on a per-site basis would duplicate Matrix blocks across all of the owner element's supported sites, when that element was first created (see relevant discussion in #3082)

In Craft 3.1.32.1, this is no longer the case – no blocks are duplicated across site entries, for a non-propagating Matrix field in a propagating Section.

I tested this on a clean Craft 3.1.32.1 install, without any plugins installed.

I also did a bunch of testing on earlier 3.1.x builds, and it appears that this issue first occurs in 3.1.28 – everything works as expected, prior to that release.

I can't see any notes in the changelog about this being intentionally reverted back to its <3.0.27 behaviour, so I'm assuming this is a bug?

Steps to reproduce

  1. Create a Section that is propagating across multiple sites
  2. Add a Matrix field to that Section, that has the "Manage blocks on a per-site basis" checkbox checked
  3. Create a new Entry, and add some blocks to the Matrix field before saving the Entry
  4. Confirm that no blocks were duplicated to the other site versions of the Entry

Additional info

  • Craft version: 3.1.28, 3.1.32.1 (works as expected prior to 3.1.28)
  • PHP version: 7.2.14
  • Database driver & version: MySQL 5.6.42
  • Plugins & versions: none
@brandonkelly
Copy link
Member

Looks like 0a88191 is the culprit.

The fix is a little complicated, and all surrounding code has been refactored in Craft 3.2. Since 3.2 is so close to a stable release, I’ve fixed this there (for 3.2.0-RC2) rather than for 3.1.

To get the fix early, change your craftcms/cms requirement in composer.json to:

"require": {
  "craftcms/cms": "3.2.x-dev#561353619b03f16dd8b3694141d1c371467577b4 as 3.2.0-RC1",
  "...": "..."
}

Then run composer update.

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

No branches or pull requests

2 participants