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

[5.x]: Nested entries missing from older revisions #16443

Open
rungta opened this issue Jan 16, 2025 · 3 comments
Open

[5.x]: Nested entries missing from older revisions #16443

rungta opened this issue Jan 16, 2025 · 3 comments
Labels

Comments

@rungta
Copy link

rungta commented Jan 16, 2025

What happened?

Description

Older revisions appear to be missing some nested entries (via a matrix field).

Steps to reproduce

We have not been able to consistently reproduce this behavior, but we have at least one instance of this on a live production site where a revision created post upgrading to Craft 5.5.8 appears to be missing (most of) its nested entries (via a matrix field).

There were also a large number of “Resaving entries” queue tasks running in parallel (due to the upgrade from 5.3.6 to 5.5.8) so unsure if this bug occurred due to some race condition between the resaving task and a user-initiated entry save operation.

While investigating this issue we noticed that revisions created on older versions of Craft (5.3.6) were also missing some nested entries, but reporting it as a new bug because this behavior still seems to be present in 5.5.8.

Expected behavior

Older revisions retain all the nested entries that belonged to the matrix field when the revision was created.

Actual behavior

Certain nested entries seem to be missing.

  1. Revision 57 (screenshot from a backup taken at 2025-01-12 12:30pm)
    Image

  2. Same revision 57 is missing the fourth nested entry (Our Voices, Upcoming Events) after a few edits were made. (screenshot from a backup taken one hour later at 2025-01-12 1:30pm)
    Image

  3. Same revision 57 is missing 5 of the 6 nested entries after a few more edits were made, and the entry was also restored at one point from revision 60. (screenshot from current state on production)
    Image

Craft CMS version

5.5.8

PHP version

8.2.27

Operating system and version

Ubuntu 22.04 LTS

Database type and version

MariaDB 10.11.10

Image driver and version

Imagick 3.7.0 (ImageMagick 6.9.11-60)

Installed plugins and versions

  • Calendar Links 4.0.0
  • Child Me! 2.2.3
  • CKEditor 4.4.0
  • Colour Swatches 5.1.0
  • Element Index Defaults 4.0.0
  • Formie 3.0.16
  • Hyper 2.2.2
  • iCalendar 5.0.0
  • Image Resizer 4.0.1
  • Imager X 5.1.0
  • LJ Dynamic Fields 5.0.1
  • Minify 5.0.0
  • No-Cache 3.0.4
  • Obfuscator 1.2.0
  • oEmbed 3.1.3
  • Preparse 3.0.0-alpha.2
  • Redirector dev-dev
  • Redirects 5.0.4
  • Retcon 3.2.1
  • Router v1.x-dev
  • SEOMate 3.1.1
  • Single Cat 4.0.0
  • Smith 3.1.0
  • Store Hours 4.2.0
  • Table Maker 5.0.3
  • Transcoder 5.0.0
  • Twig Perversion 5.0.1
  • Typogrify 5.0.1
  • Video Utils 3.0.2
  • Webhooks 3.1.0
@rungta rungta added the bug label Jan 16, 2025
@brandonkelly
Copy link
Member

This sounds like the result of a bug we just fixed in Craft 5.5.10 (96ffcf6), where the utils/prune-revisions command was deleting nested entry revisions, when it shouldn’t have. Is it possible you or someone ran that command at some point?

@rungta
Copy link
Author

rungta commented Jan 17, 2025

No one would have run that command manually on the server. Could it have been triggered by Craft’s auto garbage collection routine(s)?

@brandonkelly
Copy link
Member

Garbage collection would only delete them if they had been soft-deleted already, but Craft never soft-deletes revisions.

we have at least one instance of this on a live production site where a revision created post upgrading to Craft 5.5.8 appears to be missing (most of) its nested entries (via a matrix field).

Were the revisions’ nested entries in tact before the update? If so, do you have a database backup you could send us, from before the update?

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

No branches or pull requests

2 participants