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
#	src/fieldlayoutelements/CustomField.php
  • Loading branch information
brandonkelly committed Sep 20, 2024
2 parents 7b98fdc + 84bea0e commit a6845a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Auto-generated handles, slugs, etc. now update immediately when the source input is changed. ([#15754](https://github.com/craftcms/cms/issues/15754))
- Fixed a bug where Table fields’ Default Values table could lose existing rows if they only consisted of Dropdown columns without configured options.
- Fixed a bug where custom fields’ `required` properties were always `false`. ([#15752](https://github.com/craftcms/cms/issues/15752))
- Fixed a bug where it wasn’t possible to save nested entries via the `entries/save-entry` controller action. ([#15737](https://github.com/craftcms/cms/issues/15737))
- Fixed a bug where hyperlinks in Link field inputs could wrap unnecessarily. ([#15738](https://github.com/craftcms/cms/issues/15738))

Expand Down
7 changes: 7 additions & 0 deletions src/fieldlayoutelements/CustomField.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ class CustomField extends BaseField
*/
public function __construct(?FieldInterface $field = null, $config = [])
{
// ensure we set the field last, so it has access to other properties that need to be set first
// see https://github.com/craftcms/cms/issues/15752
$fieldUid = ArrayHelper::remove($config, 'fieldUid');
if ($fieldUid) {
$config['fieldUid'] = $fieldUid;
}

parent::__construct($config);

if ($field) {
Expand Down

0 comments on commit a6845a0

Please sign in to comment.