Skip to content

Commit

Permalink
Fix Neo content sometimes being lost on provisional draft after revert
Browse files Browse the repository at this point in the history
  • Loading branch information
ttempleton committed Nov 13, 2024
1 parent 8e541ab commit 8256544
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## Unreleased

### Fixed
- Fixed a bug where reverting content on an entry with a provisional draft could cause Neo content on the provisional draft to be lost

## 4.2.19 - 2024-10-31

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion src/services/Fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ public function mergeCanonicalChanges(Field $field, ElementInterface $owner): vo
$allBlocks[] = $derivativeBlock;
}
}
} elseif (!$canonicalBlock->trashed && $canonicalBlock->dateCreated > $owner->dateCreated) {
} elseif (!$canonicalBlock->trashed && $canonicalBlock->dateUpdated > $owner->dateCreated) {
$allBlocks[] = $newBlock = $elementsService->duplicateElement($canonicalBlock, [
'canonicalId' => $canonicalBlock->id,
'level' => $canonicalBlock->level,
Expand Down

0 comments on commit 8256544

Please sign in to comment.