Skip to content

Commit bc04729

Browse files
committed
Set owner-is-canonical based on the primary owner
See #15956 (comment)
1 parent c2890d1 commit bc04729

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- Fixed a bug where Link field query params weren’t working for elements that hadn’t been saved since updating to Craft 5.5.0+. ([#16113](https://github.com/craftcms/cms/issues/16113))
1010
- Fixed a bug where Live Preview wasn’t reloading after reordering nested entries or addresses. ([#16122](https://github.com/craftcms/cms/issues/16122))
1111
- Fixed a JavaScript error that could occur when reordering structured elements within an embedded element index. ([#16103](https://github.com/craftcms/cms/issues/16103))
12+
- Fixed a bug where changes to nested entries/addresses in card view were getting published immediately on save, if the parent element was a draft.
1213

1314
## 5.5.0.1 - 2024-11-13
1415

src/helpers/Cp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ private static function baseElementAttributes(ElementInterface $element, array $
909909
'field-id' => $element instanceof NestedElementInterface ? $element->getField()?->id : null,
910910
'primary-owner-id' => $element instanceof NestedElementInterface ? $element->getPrimaryOwnerId() : null,
911911
'owner-id' => $element instanceof NestedElementInterface ? $element->getOwnerId() : null,
912-
'owner-is-canonical' => $element instanceof NestedElementInterface ? $element->getOwner()?->getIsCanonical() : null,
912+
'owner-is-canonical' => $element instanceof NestedElementInterface ? $element->getPrimaryOwner()?->getIsCanonical() : null,
913913
'site-id' => $element->siteId,
914914
'status' => $element->getStatus(),
915915
'label' => (string)$element,

0 commit comments

Comments
 (0)