Skip to content

Commit

Permalink
Merge pull request #16188 from craftcms/bugfix/16182-global-sets-and-…
Browse files Browse the repository at this point in the history
…nested-element-workflow

check if elementEditor exists
  • Loading branch information
brandonkelly authored Nov 22, 2024
2 parents cb1486a + 67540b5 commit 8141de9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Fixed an error that could occur when creating a nested element. ([#16162](https://github.com/craftcms/cms/pull/16162))
- Fixed a bug where custom fields weren’t being displayed at 25% width when they should have. ([#16165](https://github.com/craftcms/cms/pull/16170))
- Fixed a bug where the “Default Table Columns” element source settings could contain duplicate checkbox options. ([#16177](https://github.com/craftcms/cms/issues/16177))
- Fixed a JavaScript error that broke nested element creation in global sets. ([#16182](https://github.com/craftcms/cms/issues/16182))

## 5.5.2 - 2024-11-19

Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/web/assets/cp/src/js/NestedElementManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,9 @@ Craft.NestedElementManager = Garnish.Base.extend(
onBeforeSubmit: async () => {
// If the nested element is primarily owned by the same owner element it was queried for,
// then ensure we're working with a draft and save the nested entry changes to the draft
// note: this workflow doesn't apply to entries nested directly in global sets as globals don't use element editor
if (
typeof this.elementEditor !== 'undefined' &&
Garnish.hasAttr($element, 'data-owner-is-canonical') &&
!this.elementEditor.settings.isUnpublishedDraft
) {
Expand Down

0 comments on commit 8141de9

Please sign in to comment.