Skip to content

Commit 687b66b

Browse files
committed
Fix #1014
1 parent 1405ce4 commit 687b66b

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 4.4.7 - 2025-10-06
4+
5+
### Fixed
6+
- Fixed a bug where revision Neo blocks shared by revision owners would be deleted for newer owners when the oldest owner was pruned
7+
38
## 4.4.6 - 2025-09-19
49

510
### Fixed

src/services/Fields.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,16 @@ public function createRevisionBlocks(Field $field, ElementInterface $canonical,
746746
array_unique($ownershipData, SORT_REGULAR),
747747
);
748748

749+
// Ensure unedited revision blocks have their primaryOwnerId updated,
750+
// so they don't get deleted for newer owners when an older owner gets pruned
751+
foreach ($ownershipData as $ownershipRow) {
752+
Db::update('{{%neoblocks}}', [
753+
'primaryOwnerId' => $ownershipRow[1],
754+
], [
755+
'id' => $ownershipRow[0],
756+
], [], false);
757+
}
758+
749759
foreach ($jobData as $siteId => $data) {
750760
$queue->push(new SaveBlockStructures([
751761
'fieldId' => $field->id,

0 commit comments

Comments
 (0)