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]: Edits made by one user not respected in other users' account #16519

Closed
vardumper opened this issue Jan 24, 2025 · 2 comments
Closed

[3.x]: Edits made by one user not respected in other users' account #16519

vardumper opened this issue Jan 24, 2025 · 2 comments

Comments

@vardumper
Copy link

What happened?

Description

I make edits (translations) to an entry with one admin account and save the entry. Then I log out and log into another admin account and load the exact same entry for the same site. Now I see old content (untranslated) again. A box with a yellow border is indicating that content was restored/merged in.

Steps to reproduce

  1. Edit a translation and save
  2. Log out, Log in with a different account
  3. See old un translated content again. Sometimes the yellow box shows indicating that changes were merged in. Sometimes it doesn't show, but the entry shows an "edited" note.

Expected behavior

If someone saved an entry, I would expect all other accounts to load the same published content

Actual behavior

Old untranslated content loads. Sometimes the yellow box shows indicating that changes were merged in. Sometimes it doesn't show, but the entry shows an "edited" note.
The field that is replaced with old un-translated text shows a blue left border. Not a yellow one.

I can't seem to find a way to prevent this merging in. It seems Craft keeps a "user version" of specific fields. The entries in question have been imported programmatically.
Looking into the code it seems that a mergeCanonicalChanges() is doing this. Is there some documentation about this?

Craft CMS version

3.9.14

PHP version

8.2

Operating system and version

Linux

Database type and version

Postgres 14.x

Image driver and version

No response

Installed plugins and versions

CodeMirror 2
Do It Yourself Widget 2.1
Element API 2.8.6.1
Image Hotspots 1.2
Maps 3.9.5
MatrixMate 1.5
Navigation 1.4.33
Redactor 2.10.12
SentrySDK 1.1.2
SEO 3.7.7
Store Hours 2.2.0
Super Table 2.7.5.1
Tags 1.0.9
Typesets v3.x

@vardumper
Copy link
Author

After upgrading to Craft 4.x I get a similar behaviour: instead of a yellow border box, I get "Showing unsaved changes" loading an old version back into the fields, that have been previously saved with a different account.

@brandonkelly
Copy link
Member

Thanks for reporting! I was able to reproduce this when working with content within Matrix fields. Just fixed for the next Craft 4 and 5 releases.

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