Pre-release notes
https://getkirby.com/releases/5
✨ Enhancements
- New
$force
argument forKirby\Form\Fields::submit()
andKirby\Form\Form::submit()
to submit any value, even if the field is disabled, inactive or not translatable. #7283 This enhancement is related to the regression fix for disabled fields (see below) - Lab: overview is filterable via a search input #7293
- Lab: internal components are hidden from docs; unstable components are marked as such #7295
🐛 Bug Fixes
- Dialogs:
Cmd+S
doesn't re-submit the dialog when its already submitting #7258
🐛 Fixed regressions from previous pre-releases
- Passing
false
as label value to<k-field>
will no longer throw a console error. We use this in the new<k-entries-field>
to disable labels for nested fields. - The new
<k-entries-field>
checks for a valid array as given value and will no longer throw a console error ifnull
is passed. #7265 - Fixed illegible text after using autofill in the login view in dark mode #7287
- Fixed referencing view buttons from config file in blueprint. #7278
- Properly resolve plugin's
extends
#7253 Kirby\Cms\ModelWithContent::update()
will accept disabled fields again, unless$validate
is switched on. #7268- Remove colored borders on buttons in collapsed button group #7279 (thanks to @adamkiss)
🩹 Unbreaking change
You can use Kirby\Content\Content::update()
again to update a content object in memory. As before, this will not write anything to disk, but will only assign temporary content values that might be useful in a template, controller or other parts of your code. With this change, updating content in structures, blocks or entry fields will work as expected. With our new v5 content architecture, you have to adapt your code slightly though if you update content objects of models (pages, users, files, site). The content objects in models are longer cached and you can only keep on working with the updated objects if you assign them to a variable and work with that. #7285 #7250
Before
$page->title();
// Foo
$page->content()->update([
'title' => 'Bar'
]);
$page->title();
// Bar
After
$page->title();
// Foo
$content = $page->content()->update([
'title' => 'Bar'
]);
$page->title();
// Foo
$content->title();
// Bar