Skip to content

Commit

Permalink
Merge branch '4.x' of https://github.com/craftcms/cms into 5.x
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
  • Loading branch information
brandonkelly committed Oct 8, 2024
2 parents 1920876 + 165b8a0 commit e01adb1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Fixed errors that could occur if a custom source or field condition referenced a custom field whose type had changed. ([#15850](https://github.com/craftcms/cms/issues/15850))
- Fixed a bug where disclosure menus weren’t sticking to their trigger element as it was scrolled, if it was within a slideout or other inline-scrollable container. ([#15852](https://github.com/craftcms/cms/issues/15852))
- Fixed a bug where the default backup command for MySQL was exporting triggers twice. ([#15854](https://github.com/craftcms/cms/pull/15854))
- Fixed a bug where Multi-select fields were saving the selected options in the user-selected order rather than the field-defined order. ([#15857](https://github.com/craftcms/cms/issues/15857))
- Fixed a bug where field toggling wasn’t working properly for boolean menus and radio groups.
- Fixed a bug where eager-loading wasn’t working properly when multiple fields had the same handle. ([#15796](https://github.com/craftcms/cms/issues/15796))
- Fixed a bug where where required Full Name fields weren’t getting enforced for users. ([#15808](https://github.com/craftcms/cms/issues/15808))
Expand Down
8 changes: 5 additions & 3 deletions src/fields/BaseOptionsField.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,11 @@ public function serializeValue(mixed $value, ?ElementInterface $element): mixed
{
if ($value instanceof MultiOptionsFieldData) {
$serialized = [];
foreach ($value as $selectedValue) {
/** @var OptionData $selectedValue */
$serialized[] = $selectedValue->value;
// Build the list out in the original option order
foreach ($value->getOptions() as $option) {
if ($option->selected) {
$serialized[] = $option->value;
}
}
return $serialized;
}
Expand Down

0 comments on commit e01adb1

Please sign in to comment.