🐛 Bug fixes
- Deleting, renaming or moving a page, file or user from its own view no longer causes a failed unlock request in the browser console. Unlocking a model that no longer exists now succeeds silently. #8845
- Info, gap and line fields no longer render unknown props as HTML attributes #8844
- The update status cell in the system view's plugins table no longer renders unknown props as HTML attributes #8844
- Range field:
required,minandmaxerrors show as soon as the field loads #8825 - URL field: an invalid URL is marked invalid as soon as the field loads, not only after editing it #8846
- Color field: Ctrl+S converts the typed color to the field's format, like Cmd+S and Enter #8848
- Writer field: a
minlength/maxlengtherror goes away when the value changes from outside, e.g. after discarding changes #8849 - Time field previews show a value that isn't a full ISO time (e.g.
09:05) as is instead of nothing #8851 - Blocks field: pasting into a field that already has more blocks than
maxadds no blocks #8850 - Blocks field: focusing the field without a block selects the first block #8853
- Slug field: the path preview no longer ends in
undefinedwhen the slug is empty #8855 - Language names in the languages view can be opened in a new tab #8831
- Files, pages and users fields remove a deleted file, page or user from their value #8834
- Deleting a file no longer stores unchanged values of files fields #8834
- The change status dialog no longer shows an
[unknown]option when the page's status isn't defined in its blueprint #8838 - Date field:
time: { times: false }hides the times dropdown #8822 - Stats that open a dialog or drawer are buttons now instead of links with an empty
href#8831
🧹 Housekeeping
- Move to new CS fixer rule to alphabetically sort all methods and properties #8466
- Updated translations
- Updated JS dependencies
- Updated PHP dependencies
Included in earlier pre-releases, but we forgot to mention
🎉 Features
-
Page blueprints: each status can define a custom
icon(icon name or emoji) andtheme. They're used for the status button, pages sections and the change status dialog. #8551status: draft: label: Idea icon: 💡 unlisted: label: In review text: Waiting for an editor icon: preview theme: purple listed: label: Published icon: globe theme: positive
-
New
$field->toEnum(MyEnum::class)field method converts a field value into a case of the given backed enum #8556
enum Category: string
{
case News = 'news';
case Event = 'event';
public function hasDate(): bool
{
return $this === self::Event;
}
}
$category = $page->category()->toEnum(Category::class);
if ($category?->hasDate() === true) {
// …
}✨ Enhancements
<k-choice-input>has a newthemeprop to colour its icon- New
inheritargument forKirby\Cms\Responder::redirect(),Kirby\Cms\Response::redirect(),Kirby\Http\Response::redirect(),Kirby\Http\Response::go(),Kirby\Cms\Page::go()and thego()helper. It keeps the query and params of the current request; the target's own query and params win.
🐛 Bug fixes
- An impersonation started inside a model hook (e.g.
page.update:after) no longer carries over to the rest of the request #8549 - Query runner:
&&/ANDnow bind tighter than||/OR, e.g.a || b && cisa || (b && c)#8574 - Whitespace before
<?phpin config or plugin files now throws an error also when output buffering is enabled, instead of breaking images #8091 Kirby\Toolkit\Totpnow throwsKirby\Exception\InvalidArgumentExceptionfor invalid Base32 secrets inforcemode instead of quietly using a wrong key #8581- Status icons in pages sections now show the custom status label from the blueprint in their tooltip #7043
Kirby\Database\Query::fail()now only affects the query it is called on. #8677Kirby\Database\Database::validateTable()andKirby\Database\Database::validateColumn()now throw the original database error when they can't load the list of tables or columns. #8677Str::pool()now return always an array of strings or one string with all characters, never an array of integers #8712isset($slots->heading)now returnstruefor defined slots inKirby\Template\SlotsKirby\Toolkit\Html::video()embeds video files whose URL mentions YouTube or Vimeo (e.g./videos/youtube-intro.mp4) instead of returningnullKirby\Toolkit\Html::gist()encodes the file name in the script URL, so names with spaces,&or#load the right file.Kirby\Database\Sql::selected()no longer applies a qualified column's table (e.g.test.id) to the unqualified columns after it.Kirby\Http\Uri::setFragment()andKirby\Http\Uri::inherit()no longer drop a fragment of0.Kirby\Filesystem\F::range()returns an empty string instead of throwing an error when there is nothing to read.- Pasted HTML with several code blocks keeps the language of each block (
Kirby\Parsley\Schema\Blocks::pre()) Kirby\Parsley\Element::query()andKirby\Parsley\Element::find()returnnullfor an invalid XPath query instead of throwing aTypeError, andKirby\Parsley\Element::filter()returns[]- Blocks and layout field validation errors now name the type of the invalid block, not of an earlier block of a different type.
Kirby\Filesystem\F::type()detects short filenames likea.jsand bare extensions of any length likemdown#8728Kirby\Cms\Items::factory()(blocks, layouts, structure) keeps theparentandfieldparams for empty items. So theparent()of an empty blocks field is now the page, not the site.$collection->group()groups by'0',0and empty strings instead of throwing an exception.- Fixed registered blocks methods.
Kirby\Cms\PageRules::changeStatusToListed()no longer throws aTypeErrorwhen called without a position.Kirby\Text\KirbyTags::parse()returns the text unchanged instead of throwing aTypeErrorwhen the regex fails.- Languages whose
localearray defines neitherLC_ALLnorLC_CTYPEno longer throw an error and use the slug rules of their language code. Kirby\Option\Optionsaccepts options with anullvalue.Kirby\Toolkit\Str::accepted()treatsq=0as the lowest quality instead of1#8714Kirby\Toolkit\Str::slug()no longer leaves a trailing separator when the slug is cut at$maxlength#8714Kirby\Toolkit\A::random()keeps integer keys when$shuffleistrue#8714- An upload fails with an error when its sanitized file cannot be written. #8718
- Reading a file with
F::read()right after it was replaced no longer fails on certain filesystems #8719 - Redirects to the language URL, from
/home, from page UUID permalinks and frompage.htmlnow keep the query and params of the request #7603 Kirby\Http\Uri::toString(): params on a relative root URL no longer produce a protocol-relative//page:2URLKirby\Http\Uri::inherit()keeps the Uri's own query, params and fragment; the parent only adds missing ones
♻️ Refactored
- Pass an array to
http_build_query()to avoid future deprecation issues in PHP 8.6 #8558 - Simplify MemoryStorage cache id #8559
Since rc.1
🐛 Bugs/regressions fixed
- Writer field no longer crashes when a plugin node or mark doesn't define a
schema#8842 - The Entries field no longer ignores the default value of its entry field #8824
- Files, pages and users picker dialogs respect
max: 1again and only allow selecting a single item #8823 - "Change URL", "Rename" and the other title/name dialogs focus and select the current value again #8840
- Pages created without a dialog now store the same UUID that is used in their title, slug and default values #8832
- Structure fields no longer break the Panel view for content that isn't a list of rows #8868
- Time field:
times: falsehides the times dropdown again #8822