Skip to content

Commit

Permalink
Merge branch 'v3' of https://github.com/craftcms/cms into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
  • Loading branch information
brandonkelly committed Apr 21, 2023
2 parents 2dd1c6a + 79bb42f commit 44df25a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Fixed a bug where it was possible to select a disallowed volume as the Default Asset Location in Assets field settings. ([#13072](https://github.com/craftcms/cms/issues/13072))
- Fixed a bug where it was possible to upload files to Assets fields outside of the allowed volumes, if the Default Upload Location was set to a disallowed volume. ([#13072](https://github.com/craftcms/cms/issues/13072))
- Fixed an error that could occur if a Plain Text field had over 1,000,000 bytes. ([#13083](https://github.com/craftcms/cms/issues/13083))
- Fixed a bug where relational field values weren’t yielding any results for event handlers immediately after a draft had been merged. ([#13087](https://github.com/craftcms/cms/issues/13087))
- Fixed an error that could occur when running tests. ([#13076](https://github.com/craftcms/cms/issues/13076))
- Fixed an error that occured when sending the activation email for a new user, if there were any validation errors due to new group assignments. ([#13060](https://github.com/craftcms/cms/issues/13060))
- Fixed a bug where the “Send an activation email now” user account checkbox was losing its value if there were any validation errors.
Expand Down
4 changes: 2 additions & 2 deletions src/fields/BaseRelationField.php
Original file line number Diff line number Diff line change
Expand Up @@ -993,8 +993,8 @@ public function afterElementSave(ElementInterface $element, bool $isNew): void
/** @var int|int[]|false|null $targetIds */
Craft::$app->getRelations()->saveRelations($this, $element, $targetIds);

// Reset the field value if this is a new element
if ($isNew) {
// Reset the field value?
if ($element->duplicateOf !== null || $element->mergingCanonicalChanges || $isNew) {
$element->setFieldValue($this->handle, null);
}

Expand Down

0 comments on commit 44df25a

Please sign in to comment.