craftcms / craftcms/cms

Reverting entries to older version is breaking page.

Open
#9,784 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
3.6k
Forks
705
Avg merge
1d 5h
Merged PRs (30d)
134

Description

Screen Shot 2021-09-01 at 2 02 27 PM
Screen Shot 2021-09-01 at 2 03 13 PM

Description

Reverting to older entry is causing problems. Once I revert, the old revision loses all of its content. When I revert and switch back to current version there is duplicate content. This is happening with my Matrixes and Neo's. I am using a two sites (english and french version) and when I revert it also overwrites on lang with the other. Related - I was reverting because after saving some edits on my english site I noticed the french version's content all changed into the english versions.

Steps to reproduce
  1. Select an older version of an entry.
  2. Revert to the older version
  3. Older version of entry is now empty.
  4. Switch back to current version.
  5. Content is duplicated or broken.
Additional info
  • Craft version: 3.7.10
  • PHP version: 7.4.15
  • Database driver & version: MySQL 5.7.12
  • Plugins & versions: Neo 2.11.9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the revision-revert flow described in the issue with Craft 3.7.10, PHP 7.4.15, MySQL 5.7.12, Matrix, and Neo across English and French sites. Check whether reverting preserves the older content, avoids duplicate content when returning to the current version, and keeps localized content from being overwritten; the issue names no files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, php
Domain
backend, content, databases, localization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.