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

[3.x]: draft publishing, dissapearing blocks #10906

Closed
SHoogland opened this issue Apr 12, 2022 · 8 comments
Closed

[3.x]: draft publishing, dissapearing blocks #10906

SHoogland opened this issue Apr 12, 2022 · 8 comments

Comments

@SHoogland
Copy link

What happened?

Description

Blocks dissapear if you use the original draft url to continue working on in a new tab
Its fairly obscure user behaviour, but looking at the other fields, content only dissapears if it is a matrix field.

Steps to reproduce

  1. create new draft
  2. fill it in with matrix blocks
  3. copy the url (without slug and with the fresh=1 query param)
  4. share the link / open in another window
  5. add another block
  6. publish
  7. previous blocks dissapear

Expected behavior

combine the first draft blocks with the block added after going to the link
example link: https://siteurl/admin/entries/[section]/12345?site=siteHandle&draftId=123&fresh=1

Actual behavior

original blocks dissapear

Craft CMS version

Craft Pro 3.7.37

PHP version

7.4.3

Operating system and version

Linux 5.4.0-80-generic

Database type and version

MySQL 8.0.28

Image driver and version

Imagick 3.4.4 (ImageMagick 6.9.10-23)

Installed plugins and versions

Amazon S3 1.3.0
CP Field Inspect 1.3.1
Field and Tab Permissions 2.0.2
Forms 3.13.7
Position Fieldtype 1.0.17
Presence 1.0.0
Redactor 2.10.5
Related 1.2.0
SendGrid 1.2.3
SEO 3.7.4
Super Table 2.7.1

@brandonkelly
Copy link
Member

Just followed your steps but wasn’t able to reproduce. Can you try reproducing on a fresh Craft install, and then start reproducing your current install by re-adding plugins one-by-one, and see if one of them was the culprit?

@SHoogland
Copy link
Author

Ah shit, I should have tried that myself, sorry!
Although I did find the bug in a clean install as well, it has something to do with multisite/languages:

  • clean install
  • 4 sites:
  • sitegroup1 site1NL
  • sitegroup1 site1EN
  • sitegroup2 site2NL
  • sitegroup2 site2EN
  • 1 section (articles) with:
  • channel
  • no urls for sitegroup2
  • 1 field (matrix field called blocks)
  • 2 matrix blocks with a single plain text field (text and highlight)
  • the blocks field has language propagation
  • the fields inside the blocks are default (just a plain text field with a name)
  • Then start the original steps again.

This was a good time to try the nitro tool, very nice 👌
Hopefully this enables you to reproduce it, and we can figure out what is going on.

@brandonkelly
Copy link
Member

Unfortunately even with that setup, I’m unable to reproduce. Are you simultaneously resaving content from the initial tab?

@SHoogland
Copy link
Author

maybe this helps? 🤔

Screen.Recording.2022-05-10.at.22.13.57.mov

I tried it in craft 4 as well, but I can't reproduce it there, probably because of the live syncing changes or something.
and I haven't heard anything from my client since I explained how he can avoid it.

so maybe its more of a non issue at this point, but maybe you find it interesting to figure out what is going on.

@brandonkelly
Copy link
Member

Yeah that’s exactly what I tried on my end (and a few variations of it). Just tested again and still working fine.

When you tested on a fresh install, you did it without any plugins?

@SHoogland
Copy link
Author

just nitro install, downgrade craft to 3.7 and run install and the steps mentioned... did you also use the matrix field setting propagationMethod: language

anyway I just see another reason to upgrade to 4.0

anything else I can do to help?

@SHoogland
Copy link
Author

The exact config/repo: https://github.com/SHoogland/craft-matrix-block-bug

@brandonkelly
Copy link
Member

Thanks! Was able to reproduce with that. Pretty sure it’s the same setup I was testing with, but maybe I forgot to change the Matrix field’s propagation method, which was a critical part of the equation.

Craft 3.7.43 and 4.0.3 are out now with a fix for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants