Skip to content

Commit

Permalink
Merge pull request #402 from creative-commoners/pulls/5/schema-exception
Browse files Browse the repository at this point in the history
DOC LogicException when no react component
  • Loading branch information
GuySartorelli authored Nov 22, 2023
2 parents a140076 + 51cba6c commit 55dabe9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions en/04_Changelogs/5.2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 55dabe9

Please sign in to comment.