diff --git a/CHANGELOG.md b/CHANGELOG.md index 2710905b6e0..fbeb7d1796b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - 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)) - Fixed a bug where Live Preview wasn’t reloading after reordering nested entries or addresses. ([#16122](https://github.com/craftcms/cms/issues/16122)) - Fixed a JavaScript error that could occur when reordering structured elements within an embedded element index. ([#16103](https://github.com/craftcms/cms/issues/16103)) +- 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. ## 5.5.0.1 - 2024-11-13 diff --git a/src/helpers/Cp.php b/src/helpers/Cp.php index 82093b44849..88e13fdcd40 100644 --- a/src/helpers/Cp.php +++ b/src/helpers/Cp.php @@ -909,7 +909,7 @@ private static function baseElementAttributes(ElementInterface $element, array $ 'field-id' => $element instanceof NestedElementInterface ? $element->getField()?->id : null, 'primary-owner-id' => $element instanceof NestedElementInterface ? $element->getPrimaryOwnerId() : null, 'owner-id' => $element instanceof NestedElementInterface ? $element->getOwnerId() : null, - 'owner-is-canonical' => $element instanceof NestedElementInterface ? $element->getOwner()?->getIsCanonical() : null, + 'owner-is-canonical' => $element instanceof NestedElementInterface ? $element->getPrimaryOwner()?->getIsCanonical() : null, 'site-id' => $element->siteId, 'status' => $element->getStatus(), 'label' => (string)$element,