diff --git a/en/04_Changelogs/5.2.0.md b/en/04_Changelogs/5.2.0.md index 51b7f7328..a090fcf5f 100644 --- a/en/04_Changelogs/5.2.0.md +++ b/en/04_Changelogs/5.2.0.md @@ -12,6 +12,7 @@ title: 5.2.0 (unreleased) - [Create random passwords for new users](#create-random-passwords-for-new-users) - [Buttons to select all files and deselect all files](#bulk-action-buttons) - [More nuanced permissions for `/dev/*` routes](#dev-route-permissions) + - [New exception in React forms](#react-forms-exception) - [Other new features](#other-new-features) - [API changes](#api-changes) - [Bug fixes](#bug-fixes) @@ -112,6 +113,16 @@ Now, all of the controllers which handle these routes that come packaged in a co You can also now optionally implement a `canView()` method on your `BuildTask` implementations to restrict accessed for specific tasks even further. This means you can grant access to _some_ tasks to specific users or groups without granting access to _all_ tasks. +### New exception in React forms {#react-forms-exception} + +A [`LogicException`](https://www.php.net/manual/en/class.logicexception.php) is now thrown by [`FormSchema::getSchema()`](api:SilverStripe\Forms\Schema::getSchema()) if a react component was not found for a field type. + +[warning] +If your project or a module you're using is currently trying to include a field which doesn't have a react component into a react-rendered form, it will have been silently failing. The form will have been rendering everything except for the field(s) which have no react component. + +This will now fail by throwing an exception, which means your form won't render at all until you remove or replace the field(s). +[/warning] + ### Other new features - A new [`SiteTree.hide_pagetypes`](api:SilverStripe\CMS\Model\SiteTree->hide_pagetypes) configuration property has been added. Unlike [`SiteTree.hide_ancestor`](api:SilverStripe\CMS\Model\SiteTree->hide_ancestor) (which has [now been deprecated](#api-silverstripe-cms)), this is an array. This allows you to define all page types that should be hidden in a single configuration property in your yaml configuration.