NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist, #4129 most downloaded on Packagist
The Kirby core
Latest stable
5.6.3
Last release 17 days ago
05 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
297 releases · first in 2019
Drag across the ruler to compare, or tap a release to open it.
This security release fixes two cross-site scripting (XSS) vulnerabilities from writer field and image block content printed in the site frontend.
This security release fixes two cross-site scripting (XSS) vulnerabilities from writer field and image block content printed in the site frontend.
Severity: medium (CVSS score 5.4)
Kirby's writer field stores its formatted content as HTML code. Unlike with other field types, it is not possible to escape HTML special characters against cross-site scripting (XSS) attacks, otherwise the formatting would be lost.
Cross-site scripting (XSS) is a type of vulnerability that allows to execute any kind of JavaScript code inside the site frontend or Panel session of other users. If the user is logged in to the Panel, a harmful script can for example trigger requests to Kirby's API with the permissions of the victim.
Because the writer field did not securely sanitize its contents on save, it was possible to inject malicious HTML code into the content file by sending it to Kirby's API directly without using the Panel. This malicious HTML code would then be displayed on the site frontend and executed in the browsers of site visitors and logged in users who are browsing the site.
This vulnerability is critical if you might have potential attackers in your group of authenticated Panel users. They can escalate their privileges if they get access to the Panel session of an admin user. Depending on your site, other JavaScript-powered attacks are possible.
You are not affected if you don't use the writer field in any of your blueprints. The attack can only be performed by logged-in users and only surfaces in the site frontend (i.e. in your templates). The Panel itself is unaffected and will not execute JavaScript that was injected into writer field content.
We have patched the vulnerability in this release by sanitizing all writer field contents on the backend whenever the content is modified via Kirby's API. Please update to this or a later version (including Kirby 3.6.0) to fix the vulnerability.
You can find more details like the CVE ID of this vulnerability on its security advisory page.
Kirby's blocks field stores structured data for each block. This data is then used in block snippets to convert the blocks to HTML for use in your templates. We recommend to escape HTML special characters against cross-site scripting (XSS) attacks.
Cross-site scripting (XSS) is a type of vulnerability that allows to execute any kind of JavaScript code inside the site frontend or Panel session of other users. If the user is logged in to the Panel, a harmful script can for example trigger requests to Kirby's API with the permissions of the victim.
The default snippet for the image block unfortunately did not use our escaping helper. This made it possible to include malicious HTML code in the source, alt and link fields of the image block, which would then be displayed on the site frontend and executed in the browsers of site visitors and logged in users who are browsing the site.
This vulnerability is critical if you might have potential attackers in your group of authenticated Panel users. They can escalate their privileges if they get access to the Panel session of an admin user. Depending on your site, other JavaScript-powered attacks are possible.
You are not affected if you don't use the blocks field or specifically the image block in any of your blueprints. You are also protected if you use a custom block snippet that either escapes the printed values or doesn't use them. The attack can only be performed by logged-in users and only surfaces in the site frontend (i.e. in your templates). The Panel itself is unaffected and will not execute JavaScript that was injected into the image block content.
We have patched the vulnerability in this release by escaping special HTML characters in the output from the default image block snippet. Please update to this or a later version (including Kirby 3.6.0) to fix the vulnerability.
You can find more details like the CVE ID of this vulnerability on its security advisory page.
Thanks to Azrul Ikhwan Zulkifli (@azrultech) from BAE Systems AI Vulnerability Research Team for responsibly reporting the identified issues.
Your coding agent can read these notes before it upgrades. Set up the MCP server →
This release fixes the following XSS vulnerabilities inside the Panel:
This release fixes the following XSS vulnerabilities inside the Panel:
fields section now only display the escaped exception message.text displayed by the files and pages sections (filename/page title), the files, pages and users fields (filename/page title/username) and by query-based checkboxes, radio, tags and multiselect fields (default text depending on the used query) is now escaped.Note: Custom text, help and info queries in blueprints are not escaped in 3.5.7. We support HTML in these properties because there are valid use-cases for custom formatting. However there can still be XSS vulnerabilities depending on your use of these properties. In Kirby 3.6 we will provide a new feature that will make it much easier to control whether you want to allow HTML from query placeholders.
You can find out more about the issues and fixes in our security advisory.
Str::template() (e.g. to escape query output) #3454Str::template($value, $data, [
'callback' => function ($result) {
return Str::ucwords($result);
}
]);
Box component now supports a text-only mode (with the html prop set to false). For compatibility, the default value is currently true. We plan to make false (escaped text) the new default behavior in Kirby 3.6.0.Autocomplete component now has support for HTML in the text property with a new html property (defaults to false).this.$helper.string.escapeHTML (or this.$esc) helper to escape HTML special characters as entitiesisEmpty() field method support #3153map|json|avif|mjs for plugins #3436Str::template() now supports an $options array that can contain fallback, callback, start, end attributes. We plan to deprecate the old $fallback, $start and $end arguments in 3.6.0. #3454Kirby\Sane\Svg::$allowedNamespaces property is now public to allow customizing it to your needs. #3424Card component now supports HTML in its text property for consistency with ListItem.Radio, Tags and Multiselect input components now support HTML in their text properties for consistency with Checkboxes.width prop of columns in the table block preview #3323marks prop for quote block #3443Dir::make(): Fixed warning when there is a file in the provided folder path #3442Nothing published for this version
New Locale::get() method to access the current PHP locales #3319
Locale::get() method to access the current PHP locales #3319A::apply($array, $parameters) method that recursively loops through the array and resolves each entry that is a Closure by calling it with the passed parameters #3331Collection::values($map) now accepts a mapping Closure as first parameter. All items are resolved with this Closure. #3332@since tags in doc-blocks #3336layout property of the tags field is now documented #3371Nothing published for this version
Deprecated: improved docs and warnings #3166
$kirby->response()->cache(false) method that can be used to completely disable Kirby's page cache from controllers or templates$kirby->response()->expires(1234567890); // timestamp
$kirby->response()->expires(60); // minutes
$kirby->response()->expires('2021-12-31');
video KirbyTag supporting local and remote videos #3104Supports local videos, YouTube and Vimeo with a completely overhauled video tag.
true)auto, metadata, none)* The video will automatically be muted if autoplay is activated and the muted option is not defined
# local
(video: local-video.mp4)
# remote
(video: https://www.getkirby.com/sample-video.mp4)
# example 1
(video: local-video.mp4 autoplay: true)
# example 2
(video: local-video.mp4 controls: false autoplay: true loop: true)
# example 3
(video: local-video.mp4 poster: cover.jpg)
# example 4
(video: local-video.mp4 preload: auto)
# example 5
(video: https://www.getkirby.com/sample-video.mp4 muted: true controls: false autoplay: true)
# example 6
(video: local-video.mp4 poster: https://www.getkirby.com/sample-cover.jpg)
$kirby->response()->header() method now accepts a new third $lazy param. If set to true, an already set header is not overridden. #3292$block->excerpt() method #3196panel.language or site default language for the email text (in that order) #3294ListItem component #3217Topbar: Configurable menu entry for views #3206<p> #3210remove() #3162Form\OptionsQuery prop types #3283esc() helpers/methods #3254esc() helper: Remove unused $strict param #3252jp2 file extension for F class #3253Structure/StructureObject parameter docs #3251Languages::__construct() parameter description #3249$this, static and self #3167$ignore parameter in Dir::copy() is now passed down in recursive calls #3243invalid() helper #3208<p>-tags in list-block #3086Nothing published for this version
This security release fixes a cross-site scripting (XSS) vulnerability from unvalidated uploaded SVG or XML files.
This security release fixes a cross-site scripting (XSS) vulnerability from unvalidated uploaded SVG or XML files.
An editor with write access to the Kirby Panel can upload an SVG or XML file that contains harmful content like <script> tags. The direct link to that file can be sent to other users or visitors of the site. If the victim opens that link in a browser where they are logged in to Kirby, the script will run and can for example trigger requests to Kirby's API with the permissions of the victim.
This vulnerability is critical if you might have potential attackers in your group of authenticated Panel users. They can escalate their privileges if they get access to the Panel session of an admin user. Depending on your site, other JavaScript-powered attacks are possible.
Visitors without Panel access can only use this attack vector if your site allows SVG or XML file uploads in frontend forms and you don't already validate or sanitize uploaded SVG or XML files.
The attack requires user interaction by another user or visitor and cannot be automated.
The problem has been patched in this release by validating uploaded SVG and XML files and rejecting potentially harmful files. Please update to this or a later version to fix the vulnerability.
Frontend upload forms need to be patched separately depending on how they store the uploaded file(s). If you use File::create(), you are protected by updating to Kirby 3.5.4+.
Already uploaded files are not automatically validated again. If you are not sure if you have been impacted by this vulnerability in the past, we recommend to run all site files through the validator classes after updating to Kirby 3.5.4. You can use the following test script by pasting it into a template or uploading it to your web root:
<?php
@include_once __DIR__ . '/kirby/bootstrap.php';
if (version_compare(kirby()->version(), '3.5.4', '<') === true) {
die('This script requires Kirby 3.5.4+.');
}
$objects = [
// the site itself
site(),
// all pages and drafts
...site()->index(true)->values(),
// all users
...kirby()->users()->values()
];
$errors = false;
foreach ($objects as $object) {
foreach ($object->files() as $file) {
try {
// validate the contents lazily
// (if a validator exists)
$file->validateContents(true);
} catch (\Kirby\Exception\InvalidArgumentException $e) {
echo $file->id() . ': ' . $e->getMessage() . "<br>\n";
$errors = true;
}
}
}
if ($errors === false) {
echo 'No validation errors found.';
}
You only need to run this validator script once as future uploads will automatically be validated. If the script prints "No validation errors found", you have not been impacted by the vulnerability so far.
Errors that it lists may or may not be critical as our validator classes also catch files with an invalid data structure or less harmful attacks like the "billion laughs" denial-of-service attack or the usage of external sources. We recommend to review and fix each listed error manually until the script no longer finds any validation errors.
Please delete the script again after you have used it.
You can find more details like the CVE ID of this vulnerability on its security advisory page.
Thanks to @sreenathr10 for reporting the problem.
This is a patch release for a regression in 3.5.2. The regression in 3.5.2 might affect multi-language setups and will lead to a broken Panel. If you
This is a patch release for a regression in 3.5.2. The regression in 3.5.2 might affect multi-language setups and will lead to a broken Panel. If you are running a single-language setup, you don't necessarily have to upgrade to this patch release.
⚠️ Unfortunately, we discovered a regression for all multi-language installations. If you are using a multi-language setup, please use our patch inste
⚠️ Unfortunately, we discovered a regression for all multi-language installations. If you are using a multi-language setup, please use our patch instead: https://github.com/getkirby/kirby/releases/tag/3.5.3
isEmpty() and isNotEmpty() methods for layout field #3131Str class #2936 #3134F::niceSize() typography and locale #3019fail_ci_if_error argument for Codecov #3119Response::redirect() #3136site()->index(true) now always returns drafts correctly #3082$collection->filter() can no longer collide with global functions #3117<p></p> as artefacts. isEmpty() is fixed with this change as well #3115api/translations/:code now returns custom language variables #3064Nothing published for this version
New blocks navigation in the blocks drawer
settings in the Layout field can now be extended #3011$auth->status() method and Kirby\Cms\Auth\Status classpanel.language: Fall back to site default langCookie::forever() method for 32-bit servers #2968format option #3026when option #3013PHP::encode(): Fix encoding of intsF::rename overwritingNothing published for this version
We've prepared a special site for this release with all new features and changes: https://getkirby.com/releases/3.5
We've prepared a special site for this release with all new features and changes: https://getkirby.com/releases/3.5
Date input: support key manipulation for am/pm
Our last pre-release 🤞
https://github.com/getkirby/kirby/releases/tag/3.5.0-rc.1
All the good stuff from:
and …
https://github.com/getkirby/kirby/releases/tag/3.5.0-rc.1
All the good stuff from:
and …
accept options for file blueprintsPreviously, file blueprints could be configured to only allow specific MIME types to be uploaded.
accept:
extension: jpg, png
accept:
type: image, audio, video
accept:
mime: image/*
type: image
In this example, Kirby will generate a file upload input with an accept="image/*" attribute and will then validate both the MIME type and the detected file type on the server after the file is uploaded.
If no restrictions are defined in the file blueprint, Kirby will now limit the accepted uploads to the types image, document, archive, audio and video by default. This protects your sites against unexpected uploads like code files that could be used to attack the server or the visitor's browsers.
You can disable the automatic types and allow all uploads like this:
accept: true
# or:
accept:
mime: null
orientation: square
...
F::typeToExtensions() methodhttps://github.com/getkirby/kirby/releases/tag/3.5.0-rc.1
All the good stuff from:
and …
https://github.com/getkirby/kirby/releases/tag/3.5.0-rc.1
All the good stuff from:
and …
All the good stuff from: https://github.com/getkirby/kirby/releases/tag/3.5.0-rc.1 plus …
All the good stuff from: https://github.com/getkirby/kirby/releases/tag/3.5.0-rc.1 plus …
The following methods have been marked as deprecated since Kirby 3.0.0 and are now removed:
This is a pre-release and probably not fully stable yet. Don't use in production unless you don't mind potential hick-ups. We really appreciate your help while testing this release candidate!
The Kirby Builder by Tim Ötting is one of the most popular plugins out there and together with Tim we decided to add it to the core 🎉
We've rewritten it from scratch and merged it with our popular Editor plugin. The new field is called Blocks and will eventually replace both plugins.
During the RC phase, you can find docs and report issues for the blocks field here: https://github.com/getkirby/blocks
Together with the new Blocks field we are also introducing a powerful new Layout field. Arrange blocks in multiple columns and build complex page layouts.
During the RC phase, you can find docs and report issues for the layout field here: https://github.com/getkirby/blocks
We've never been really happy with our date field and many of you weren't either. The new date and time fields are a joy to work with and open completely new ways to enter dates.
Docs: TBD
You don't need the full power of the Blocks? Maybe just some inline HTML? Then the new Writer field is here for you. Create single-line HTML with formats like bold, italic, underline or links
Usage:
fields:
text:
type: writer
As another spin-off of the Blocks field, we also added a new list field, which can be used if you need to create simple ordered or unordered lists in a more visual way than with Markdown.
Usage:
fields:
list:
type: list
With 3.5 we are introducing major enhancements for our login flow.
You can now reset your password, login password-less via secure email verification code and even provide your own verification methods via auth challenge plugins. Combine this with the option to enable 2FA authentication to increase the security of your Panel.
Docs: TBD
The Panel search has been redesigned and now shows nice previews for pages, files and users.
Tabs now show unsaved changes with a new orange badge and the number of unsaved fields.
Renaming a page title or changing the page URL is now done in the same dialog. With this simplified workflow you can instantly see when your Page title and slug no longer matches and need to be updated.
Our page status icons are now accessible with distinctive forms that no longer challenge people with color blindness.
I18n::formatNumber() functionnobody to $kirby->impersonate() to switch to a user without permissions.$user->nameOrEmail() methodk-tabs componentk-overlay componentk-drawer componentk-form-drawer componentk-loader componentk-user-info componentk-reset-password-viewk-writerk-blockslogs root (https://kirby.nolt.io/122) #2875Collection::filterBy()$helper.string.template supports array length and is now case insensitivekirby.k-empty component is now automatically converted to a button if there's a click handler.The following methods have been marked as deprecated since Kirby 3.0.0 and are now removed:
$file->meta() (use $file->content())
$file->rename() (use $file->changeName())
$page->hasInvisibleChildren() (use $page->hasUnlistedChildren())
$page->hasNextVisible() (use $page->hasNextListed())
$page->hasNextInvisible() (use $page->hasNextUnlisted())
$page->hasPrevInvisible() (use $page->hasPrevUnlisted())
$page->hasPrevVisible() (use $page->hasPrevListed())
$page->hasVisibleChildren() (use $page->hasListedChildren())
$page->nextVisible() (use $page->nextListed())
$page->nextInvisible() (use $page->nextUnlisted())
$page->prevVisible() (use $page->prevListed())
$page->prevInvisible() (use $page->prevUnlisted())
$page->isInvisible() (use $page->isUnlisted())
$page->isVisible() (use $page->isListed())
$pages->invisible() (use $pages->unlisted())
$pages->visible() (use $page->listed())
$languages->findDefault() (use $languages->default())
Deprecated methods are only marked as deprecated for now and will be removed in a future version. Please update your code accordingly if you still use the deprecated methods.
$page->sort() (use $page->changeSort())We've been contacted by the security researcher Thore Imhof of Accenture with a vulnerability report that affects file uploads in Kirby's Panel.
We've been contacted by the security researcher Thore Imhof of Accenture with a vulnerability report that affects file uploads in Kirby's Panel.
An editor with full access to the Panel can upload a PHP .phar file and execute it on the server. This vulnerability is critical if you might have potential attackers in your group of authenticated Panel users, as they can gain access to the server with such a phar file. Visitors without Panel access cannot use this attack vector.
We've received this report yesterday and this release will prevent the attack.
We recommend to upgrade your sites to Kirby 3.4.5.
This security release does not introduce any features or other fixes.
New status= query parameter for /site/children and /pages/$pageId/children API endpoints. You can now filter pages by the following status options (al
user.login:failed hookstatus= query parameter for /site/children and /pages/$pageId/children API endpoints. You can now filter pages by the following status options (all, listed, unlisted, published, drafts) #2846this.$helper.string.hasEmoji(string) for the Panel and Panel pluginsdump() and e() helper functions are no longer defined if they already exist. This increases compatibility with Laravel and other frameworks.mediaRoot() for File models #2838Nothing published for this version
You can now restrict the length of slugs with the new slugs.maxlength option #1821
slugs.maxlength optionYou can now restrict the length of slugs with the new slugs.maxlength option #1821
// site/config/config.php
return [
'slugs' => [
'maxlength' => 100
]
];
when conditionsRequired fields with when conditions now can be left empty, if the when condition does not apply.
fields:
category:
type: radio
options:
- Photography
- Editorial
photographer:
when:
category: Photography
# the photographer field will now only be required when the category is "Photography"
required: true
You can now define custom text when files or pages get dragged into textareas. #2735
// site/config/config.php
return [
'panel' => [
'kirbytext' => [
'fileDragText' => function ($file, $url) {
return '(file: ' . $url . ' alt: ' . $page->alt() . ')';
},
'pageDragText' => function ($page) {
return '(link: ' . $page->url() . ' text: ' . $page->title() . ')';
}
]
]
];
Collection::not()When filtering collections, you can now pass an array of IDs or objects to Collection::not()
$menu = $site->children()->not(['home', 'error'])
// or
$a = page('some-page-a');
$b = page('some-page-b');
$menu = $site->children()->not([$a, $b]);
V::alpha($string, $unicode = false) and V::alphanum($string, $unicode = false) can now support unicode characters. This can be activated with the second argument.
https://github.com/getkirby/ideas/issues/234Asset objects in panel previews #2746# now both versions work
sortBy: date desc title desc
sortBy: date desc, title desc
$tableWhitelist in the Database class is now renamed to $tables and a validity check for correct table names is fixed. #2788beforeSend option for emails can now be predefined in the config #2769this.$api.users.list() method (this broke pagination and the role filter in the users view) #2801$site object to string now returns the URL instead of throwing an error #2802Nothing published for this version
This release is a quick patch for an annoying regression in 3.4.1 and a useful bug fix.
This release is a quick patch for an annoying regression in 3.4.1 and a useful bug fix.
We broke template switching in 3.4.1 and we are really sorry for it. This patch release will fix this regression. If your projects rely on template switching for pages, you should upgrade!
When you create user roles that don't have access to the site view with
# /site/blueprints/users/my-role.yml
permissions:
access:
site: false
... those users will be stuck in an endless loop after login, because they are not allowed to visit the site view, which is the default view. This release will fix this and redirect such users to their own account.
We wanted to get this release out there before our summer holiday break. We will be back on September 1st with new features, new fixes and new energy. See you soon!
We introduced an unintentional breaking change in 3.4.0 that broke plugin options in some third-party plugins. 3.4.1 reverts this breaking change. All…
The new gap field is a simple layout field to help you organise your fields more visually and create gaps in the field grid.
fields:
category:
type: text
width: 1/2
gap:
type: gap
width: 1/4
featured:
type: toggle
width: 1/4
text:
- "no"
- "yes"
With conditional fields
fields:
hasHeadline:
type: radio
options:
- yes
- no
headline:
type: text
width: 1/2
when:
hasHeadline: yes
gap:
type: gap
width: 1/2
when:
hasHeadline: no
text:
type: textarea
All API methods in the Panel now support async await as an alternative to promise callbacks. This helps to break out of callback hell.
const page = await this.$api.pages.get("photography");
console.log(page.title);
beforeSend option for $kirby->email()You can now access the phpMailer instance for more fine-grained control in the new beforeSend option:
$kirby->email([
'from' => 'no-reply@supercompany.com',
'to' => 'someone@gmail.com',
'subject' => 'Thank you for your contact request',
'body' => 'We will never reply',
'transport' => [
'type' => 'smtp',
'host' => 'mail.getkirby.com',
'port' => 465,
'security' => true,
'auth' => true,
'username' => 'test@test.com',
'password' => 'randomString',
],
// new feature
'beforeSend' =>function ($mailer) {
$mailer->SMTPOptions = [
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
]
];
return $mailer;
}
]);
You can also use this new option in email presets in your config file.
For Dark Mode users, the favicon of the panel will now automatically switch color and adjust to the dark browser bar.
Form::content() methodVue.$helper.string.camelToKebab(string) helperVue.$helper.isComponent(componentName) helperKirby\Http\Request\Query in line with Kirby\Http\Query #2692We introduced an unintentional breaking change in 3.4.0 that broke plugin options in some third-party plugins. 3.4.1 reverts this breaking change. All plugins that already shipped a fix for this breaking change unfortunately have to roll back that fix as well. We are sorry for the hassle! (You can read more about the issue here: https://github.com/getkirby/kirby/issues/2697)
words option for Collection::search() #2698$originalPage in page.duplicate:after hook to fix breaking changetranslate: false in a child of a structure field no longer saves null on secondary language #1602Remote::post() requests #2745Html::tag() method #2743Nothing published for this version
Our global search in the Panel now also searches for files.
Our global search in the Panel now also searches for files.
The Panel search is now also a core component and can be overwritten with your own search logic (#2368):
Kirby::plugin('distantnative/fuzzy-search', [
'components' => [
'search' => function (Kirby $kirby, Collection $collection, string $query = null, $params = []) {
// ...
return $collection;
}
]
]);
null.page.*:before or page.create:* or *.create:* – all variations are supported!) that will be triggered for all event actions of the given type.$event object provided as argument for all hooks that contains all information about the triggered event. The $event argument can be used instead of or in addition to the individual hook arguments.return [
'hooks' => [
'page.*:before' => function ($page, $event) {
var_dump($page); // $page
var_dump($event->name()); // 'page.create:before'
var_dump($event->type()); // 'page'
var_dump($event->action()); // 'create'
var_dump($event->state()); // 'before'
var_dump($event->page()); // $page
var_dump($event->input()); // $input
}
]
];
$app->apply() and $app->trigger() has changed. Instead of a list of arguments, they now receive an associative array with named arguments. $app->apply() now also requires a third argument that tells the method which argument should be modified by the hooks. As both methods are marked for internal use and also not very useful in sites, the only use-case for them so far was hooks defined in plugins. Plugin authors who depend on any of the two changed methods need to update their plugins to support the new signature.null for those arguments instead.@lukasbestle has developed a migration checker plugin to help check for broken hooks in your installations. You can find the plugin attached to this release (as an "Asset") or download it from GitHub Gist. Please place the PHP file in site/plugins/migration/index.php and visit any frontend page of your Kirby site to check if you need to migrate some of your hooks. Make sure to delete the plugin again after the migration.
Duplicating is enabled by default. To disable, use the following syntax:
fields:
addresses:
type: structure
duplicate: false
fields:
...
...
With the new prepend option for structure fields, you can now add new entries to the top of the list instead of the bottom (https://github.com/getkirby/ideas/issues/203)
fields:
addresses:
type: structure
prepend: true
fields:
...
...
To prevent that unsaved changes can be accidentally deleted with the click of a button, we introduced a new confirmation dialog:
You can finally write parentheses in KirbyTags. For example:
(image: my-image.jpg caption: A nice picture (by Ansel Adams))
A huge Thank-you to @afbora for his StackOverflow hunt in order to find a proper solution.
There are now date-specific collection filters that can be used like this:
$collection->filterBy('date', 'date >=', 'today');
The advantage of these filters is that all date formats that can be parsed by PHP are supported (both in the fields and in the test string).
The added filters are:
date ==date !=date >date >=date <date <=date between (or date ..)This feature is built on top of our enhanced V::date() validator. You can now also do the following validations with it:
V::date($dateA, '==', $dateB);
V::date($dateA, '!=', $dateB);
V::date($dateA, '>', $dateB);
V::date($dateA, '>=', $dateB);
V::date($dateA, '<', $dateB);
V::date($dateA, '<=', $dateB);
It is now possible to pass an action function to $kirby->impersonate(), which will run with the permissions of the impersonated user. The impersonated user is reset after the function has returned:
$result = $kirby->impersonate('kirby', function ($user) {
// $this is the $kirby object
$email = $user->email(); // 'kirby@getkirby.com'
return 'this will be returned to $result above';
});
files.read permissionIt is now possible to hide files of a specific template from users with a specific role (or to hide files in general) (https://github.com/getkirby/ideas/issues/554)
search settings for the multiselect fieldYou can now fine-tune the search experience in multiselect fields. This is especially useful if you are providing long lists of options and the result list gets unusable.
fields:
categories:
label: Categories
type: multiselect
search:
# The search starts after entering at least 2 characters
min: 2
# The result list has a limit of 5 entries but can be expanded
display: 5
options:
panel: Panel
templating: Templating
seo: SEO
security: Security
performance: Performance
analytics: Analytics
assets: Assets
text: Text
forms: Forms
utilities: Utilities
integrations: Integrations
social: Social
It's sometimes useful to modify a field directly in a controller or template. This can now be done with the new callback field method.
echo $page->title()->callback(function ($field) {
$field->value = 'Title: ' . $field->value;
return $field;
});
(https://github.com/getkirby/ideas/issues/475)
collectionMethods extensionKirby::plugin('your-name/collectionMethods', [
'collectionMethods' => [
'toCSV' => function () {
// write some code to convert the entire
// collection to CSV
}
]
]);
The new toCSV method in this plugin example will now be available for all collections in Kirby (pages, files, users, etc.)
(https://github.com/getkirby/ideas/issues/352)
servers optionTo overwrite Kirby's server check you can now set the servers option in your config. This can be used to run the Panel, even though the server setup might not officially be supported by us. It's at your own risk though.
return [
'servers' => ['apache', 'nginx', 'symfony']
];
When creating your own core components – to manipulate URLs, create thumbnails, parse markdown or more – you can now easily access the native behaviour of Kirby's components with the new $kirby->nativeComponent($componentName) method.
Kirby::plugin('your-name/url-handler', [
'components' => [
'url' => function (Kirby $kirby, string $path = null, $options = null) {
if (Str::startsWith($path, '@forum')) {
return 'https://forum.mydomain.com/' . str_replace('@forum/', '', $path);
}
return $kirby->nativeComponent('url')($kirby, $path, $options);
}
]
]);
image: icon and image: false options for items in pages or files sections.youtube and video KirbyTags as well as in Html::youtube() and Html::video() (https://github.com/getkirby/ideas/issues/532)youtube and video KirbyTags as well as in Html::video() and Html::youtube() (https://github.com/getkirby/ideas/issues/437)Kirby\Data\Xml class and support for XML in Data::encode($data, 'xml') and Data::decode($xml, 'xml').. as an alias for the between collection filter$page->go() method, which automatically triggers a redirect to the page.$kirby->contentToken() method (https://github.com/getkirby/ideas/issues/554)content.salt option (#2612, https://github.com/getkirby/ideas/issues/554)F::loadOnce() method (#2394)F::load(): Support for data variables (#2394)A::nest(): New $ignore parameterRemote class can now be configured in your site config with the remote option array.$allowImpersonation argument for $kirby->user() (#2616)$props argument for Response::file() & Response::download() to support overrides (e.g. for headers)$lazy argument for App::instance(). This allows getting the app instance only if the app is already initialized.modified() methods now support specifying language for file, page and user models:$page->modified('c', 'date', 'de');
Kirby\Toolkit\Html class available in the Kirby\Toolkit\Xml classHtml and Xml classes including tests with 100 % code coverage
Html now inherits from Xml to enable code sharing and access to the parsing and document creation methods in the Html classHtml::a()Html::email(): Fix link generation when called without text (the email address was previously not made the link text even though that is what was supposed to happen)Html::tag(): Support for passing null as the $content to explicitly generate a void tag (was already documented like this but not supported)Xml::value(): Proper CDATA support including edge-cases$database->createTable() method now supports columns with a UNIQUE constraintDb::column() and $query->column() database methods now support custom ORDER clauses so that you can order the results by any column and not just by the primary key// prepare a query with the options you need
$query = $database->table('simpsons')->fetch(function ($data, $key) {
return new Simpson($data);
});
// this line now executes the query and returns an
// array with the return values from your callback
$results = $query->all();
$database->createTable() now works reliably with SQLite (#2234)fail mode is now no longer reset after each query, which makes it more predictable as you can't know how many queries an operation needs internally. You can now enable the fail mode once for the database connection and it will stay that way until it is manually disabled again.INSERT query was executed to improve compatibility with some database servers (#2347)Database\Db class and parts of the Database\Sql classes have been refactored, which has changed some internal method signatures.Options for Kirby and for plugins can be defined as nested arrays or using the dot notation:
return [
// dot notation with a bit of nesting
'superwoman.superplugin' => [
'my.option' => 'with a value'
],
// nested arrays
'superwoman' => [
'superplugin' => [
'my' => [
'option' => 'with a value'
]
]
],
];
Both variants can now be used fully interchangeably and in any combination.
To ensure proper nesting, Kirby relies on the plugin option default values defined in the plugin using the options extension. If your plugin uses a nested structure in the option defaults, the defaults need to be changed to use the dot notation.
Only options registered in that way can be set in all supported ways (dot notation, fully or partially nested) in the site config. You can read more about this in the reference.
Url::isAbsolute() now also checks for the geo protocol (#2536)size: tiny.cURL instead of file_get_contents for enhanced reliability and better error handling (#2330)Exif camera classPage::find()ready callback is now able to overwrite more options (whoops, debug, home, error, slugs)I18n::translateCount() method (#2430 & #2431)F::load(): Prevent overwriting $fallback (#2394)Remote class now checks for valid TLS certificates in case of HTTPS requests.Data::decode() and Data::encode() methods are now used throughout Kirby instead of i.e. Yaml::encode(). This allows to create your own data handlers and decoders, which will then be used everywhere.README.mdStr::template() keeps placeholders in the result string if no value or fallback was passed (#2307)Str::excerpt() allows to pass a $rep that gets added without an additional space to the end of the excerpt. (getkirby/ideas#525)$page->changeTemplate() (#2567)F::niceSize(): kB is now KB (#2607)route:after is no longer called on $route→next() (#2418)Nothing published for this version
Nothing published for this version
Nothing published for this version
While we are busy working on 3.4, this release is a security patch for a minor issue related to .dev domains and reverse proxies.
While we are busy working on 3.4, this release is a security patch for a minor issue related to .dev domains and reverse proxies.
In order to protect new installations on public servers that don't have an admin account for the Panel yet, we block account registration there by default. This is a security feature, which we implemented years ago in Kirby 2. It helps to avoid that you forget registering your first admin account on a public server.
In this case – without our security block – someone else might theoretically be able to find your site, find out it's running on Kirby, find the Panel and then register the account first. It's an unlikely situation, but it's still a certain risk.
To be able to register the first Panel account on a public server, you have to enforce the installer via a config setting. This helps to push all users to the best practice of registering your first Panel account on your local machine and upload it together with the rest of the site.
As noted by Jukka Rautanen, this installation block still assumed that .dev domains are local domains, which is no longer true. In the meantime, those domains became publicly available. This means that our installation block is no longer working as expected if you use a .dev domain for your Kirby site. We've also used the chance to improve the local installation check if your site is behind a reverse proxy.
You are only affected if:
yourdomain.dev/panel before you register your first account.You are not affected if you have already created one or multiple Panel accounts (no matter if on a .dev domain or behind a reverse proxy).
You can use the new $page->isPublished() method as the opposite of $page->isDraft(), which will include $page->isListed() and $page->isUnlisted() stat
You can use the new $page->isPublished() method as the opposite of $page->isDraft(), which will include $page->isListed() and $page->isUnlisted() states. getkirby/ideas#375
The panel DOM has new CSS multi-lang selectors, which you can use to customize the panel based on the currently selected translation.
.k-panel[data-translation=en] {}
.k-panel[data-translation-default] {}
.k-panel:not([data-translation-default]) {}
.k-panel:not([data-translation-default]) .k-field:not([data-translate]) {}
You can now pass a collection to all sibling methods to get more useful results #2321
$prevPage = $page->prev(
$page
->index()
->listed()
->filterBy('template', 'text-note')
->sortBy('date', 'desc')
);
This works for all siblings methods for pages, files and users:
We've added a new Dir::exists($path) method to the toolkit to keep it consistent with the F class and its F::exists($path) method
uploads option is now checked before accepting dropped files in textareas #2482FileActions to enable subclasses of Filekirbytag() helper #2474$user->update() #2486Nothing published for this version
New sticky option for columns in blueprints getkirby/ideas#284 ```yaml columns:
sticky option for columns in blueprints getkirby/ideas#284columns:
- width: 1/3
sticky: true
sections: ...
$fileCache->root() method getkirby/ideas#390fields:
info:
type: info
text: Some info text
theme: none
0 #2423Nothing published for this version
The files blueprint preset has a new image option #2272
files blueprint preset has a new image option #2272greyscale, grayscale and bw as thumb options. You can now also use $image->greyscale(), $image->grayscale() or $image->bw() to achieve the same. Keep the typos coming :) #2384Nothing published for this version
Support for address names when sending email https://github.com/getkirby/ideas/issues/42
'Accept' => 'application/json' should become 'Accept: application/json' automatically)CURLOPT_USERPWD option with a new basicAuth optiontext/csv mime type #2316F class: Option to disable base64 encoding in dataUri() method #2276k-link component now allows passing a callback function as to prop. ListItem and Cards support passing callback function as link propNothing published for this version
Fixed typo in Pull Request template
@since information to inline docs, which gets reflected on our sitesortBy option in structure fields #2279text option in users field #2278$kirby object #2294getManually() method in the AutoSession classmultiselect field issues #2302number field by default #2306number field are now saved correctly again #2288Nothing published for this version
$filters = ['latest', 'featured', 'deprecated'];
Together with this release, we also release the very first version of our new Kirby Editor plugin.
Kirby Editor is a new visual writing and layout field for Kirby. Compose long-form text with consistent inline styles. Add images, videos, quotes and more. Bring your own block types and always rest assured that the output will be valid, customizable HTML.
The new editor is a major step forward for Kirby and we are very excited about it!
You can find this new plugin and the documentation for it here: https://github.com/getkirby/editor
When you edit pages, files or user accounts, you will see a new "unsaved changes" icon in the topbar. The overview of unsaved changes makes it a lot easier to keep track of content that is still work-in-progress. #1979 Read more …
We added a set of new icons that have been requested by our users and that we consider "essential". #2209
The following new icons are now available:
- bell
- book
- bookmark
- box
- bug
- car
- cart
- chart
- chat
- credit-card
- folder
- heart
- home
- layers
- linkedin
- map
- question
- star
- strikethrough
- underline
- vimeo
- whatsapp
- wheelchair
- youtube
Toggle fields in structures come with a great new preview and are even usable right from the structure overview #2126
You can also switch off the toggle text in structure columns entirely with the text option #2244:
fields:
links:
type: structure
columns:
url: true
featured:
text: false
fields:
url:
type: url
featured:
type: toggle
You can change the Smartypants configuration for quotes and other typographical details, based on the current language. #2037
<?php
// /site/languages/de.php
return [
'code' => 'de',
'direction' => 'ltr',
'locale' => 'de_DE'
'name' => 'Deutsch',
'smartypants' => [
'doublequote.open' => '„',
'doublequote.close' => '“',
]
];
ErrorPageExceptionWith the new ErrorPageException you can stop your code in your controllers, templates or plugins immediately and render the error page instead of the current page. This makes reacting to fatal errors a lot easier. #1887
Here's a controller example:
return function ($page) {
$filters = ['latest', 'featured', 'deprecated'];
if (in_array(param('filter'), $filters)) {
throw new ErrorPageException('The filter is not accepted');
}
return ['filter' => $filter];
};
You can search and paginate pages, files and users in the dialogs of the users, files and pages fields. #2208
Enable or disable subpage navigation in the pages field with the new subpages option
https://github.com/getkirby/ideas/issues/217
fields:
related:
type: pages
query: site.find("blog").children
subpages: false
We are introducing the first set of css variables for plugin developers. This will make it a lot easier to follow Kirby's panel design by using the right colors, font sizes, etc. The following variables are available.
/** Colors **/
--color-backdrop
--color-background
--color-border
--color-focus
--color-focus-light
--color-focus-outline
--color-negative
--color-negative-light
--color-negative-outline
--color-notice
--color-notice-light
--color-positive
--color-positive-light
--color-positive-outline
--color-text
--color-text-light
/** Font families **/
--font-family-mono
--font-family-sans
/** Font sizes **/
--font-size-tiny
--font-size-small
--font-size-medium
--font-size-large
--font-size-huge
--font-size-monster
/** Shadows **/
--box-shadow-dropdown
--box-shadow-item
--box-shadow-focus
ready callbackRegister last-minute options with the new ready callback. This callback is executed when Kirby's instance is ready to be fully used and you can use all roots, urls and other stuff from Kirby to set additional options accordingly. #1724
<?php
// site/config/config.php
return [
'ready' => function ($kirby) {
return [
'db' => [
'database' => $kirby->root('site') . '/db/database.sqlite',
'type' => 'sqlite'
]
];
}
];
dump() helperOverwrite our dumper with your own implementation or an implementation from a framework https://github.com/getkirby/ideas/issues/339
Kirby::plugin('my/dumper', [
'components' => [
'dump' => function ($kirby, $variable, bool $echo = true) {
// dump that var
}
]
]);
Collection::when()Use the new when() method for any collection to simplify your code when filtering or sorting items https://github.com/getkirby/ideas/issues/349
$size = get('size');
$color = get('color');
$price = get('price')
$products = $page->children()
->when($size, function ($size) {
return $this->filterBy('size', $size);
})
->when($color, function ($color) {
return $this->filterBy('color', $color);
})
->when($price, function ($price) {
return $this->filter(function ($child) use ($price) {
return $child->price()->toFloat() <= $price;
});
});
All plugin developers have full access to the helpers and libraries that we use in the panel with the new $library and $helper objects in Vue.js. #1846
Here's an example of how to use our slug helper inside a Vue component:
const slug = this.$helper.slug("Mötorhead rulez!!");
The following helpers and libraries are available:
// helpers
this.$helper.clone
this.$helper.isUploadEvent
this.$helper.debounce
this.$helper.pad
this.$helper.ratio
this.$helper.slug
this.$helper.sort
this.$helper.string.ucfirst
this.$helper.string.lcfirst
this.$helper.upload
// libraries
this.$library.autosize
this.$library.dayjs
The following new hooks are available for your plugins https://github.com/getkirby/ideas/issues/350, https://github.com/getkirby/ideas/issues/23
- system.loadPlugins:after
- user.login:before
- user.login:after
- user.logout:before
- user.logout:after
Collection::intersection() and Collection::intersects() https://github.com/getkirby/ideas/issues/214$pages->notTemplate() methodVisitor::preferredMimeType() methodVisitor::prefersJson() methodMime::matches() method::panelOptions method for all models (Page, User, File) #1951flip option for pages and files sections https://github.com/getkirby/ideas/issues/97$field->inline() method$field->nl2br() method$kirby->nonce() which can be used in custom CSP settingssvg helper now accepts Kirby’s File objectsform store module in the panel has been refactored and is now called content. If your panel plugin works with the form store module, please check out the refactored module. Conversion won't be difficult. We made lots of thinks a lot cleaner. But you need to rename the actions or getters that you use from the old module.v-tab directive is no longer available. Tabbable elements should use the tab mixin$kirby->root('translations') root is no longer available. Use $kirby->root('i18n:translations') insteadWe've also added deprecation warnings to additional core methods. You will run into an exception if the debug mode is active. You can keep those methods for now in production (with disabled debug mode), but we recommend to convert them as soon as possible. Here are the deprecated methods and how to replace them:
File::meta (use File::content instead)File::rename (use File::changeName instead)Languages::findDefault (use Languages::default() instead)Page::hasInvisibleChildren (use Page::hasUnlistedChildren instead)Page::hasNextInvisible (use Page::hasNextUnlisted instead)Page::hasNextVisible (use Page::hasNextListed instead)Page::hasPrevInvisible (use Page::hasPrevUnlisted instead)Page::hasPrevVisible (use Page::hasPrevListed instead)Page::hasVisibleChildren (use Page::hasListedChildren instead)Page::nextInvisible (use Page::nextUnlisted instead)Page::nextVisible (use Page::nextListed instead)Page::prevInvisible (use Page::prevUnlisted instead)Page::prevVisible (use Page::prevListed instead)Page::isInvisible (use Page::isUnlisted instead)Page::isVisible (use Page::isListed instead)Site::hasInvisibleChildren (use Site::hasUnlistedChildren instead)Site::hasVisibleChildren (use Site::hasListedChildren instead).gitignore for users who use JetBrains editorsV::url() validator #2130$pages->add() throws an exception when you try to add invalid objects #1890Str::slug() is restricted to 128 characters and added a new $maxlength argumentvimeo() and youtube() helpers #2118Collection::_unset() which solves a lot of problems of deleting collection items in a loop #1232create option is set to false$page->isChildOf() method is fixed and behaves as expected #2255Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
The panel can now be extended with your own icon plugins 🎉 `js panel.plugin('my/icons', { icons: { 'my-icon': ' ' } }); `
panel.plugin('my/icons', {
icons: {
'my-icon': '<path d="M7,3V13H5v2H8a1,1,0,0,0,1-1V4h2V2H8A1,1,0,0,0,7,3Z" /><circle cx="2" cy="14" r="2" /><polygon points="12 0 12 6 16 3 12 0" />'
}
});
fields:
text:
label: "Notes for {{ page.title }}"
type: textarea
help: "You can fill in some notes for {{ page.title }} here"
content.locking option (#2000)return [
'content' => [
'locking' => false
]
];
F::relativepath() methodecho F::relativepath('/Users/secret/www/site/templates/default.php', '/Users/secret/www');
// result: '/site/templates/default.php'
$options argument in Json::encode() (#2111)echo Json::encode('здравей', JSON_UNESCAPED_UNICODE);
yml and yaml extensions to F::$types (#2018)echo F::type('yaml');
// result: code
application/yaml and text/yaml to Mime::$types (#2018)echo Mime::fromExtension('yml');
// result: application/yaml
Today button in the calendar dropdown will now immediately set the date (#1736)parent option in sections is now validated correctly and a readable error message is thrown when incorrect objects or values are given (#1938)max option is set to 1 (#2109)page.update:after hook (#1401)$collection->append() and $collection->prepend() methods (#2078)page.duplicate:after hook is triggered (#1923)info option in the users field is now working correctly (#2050)12:00 AM (#1781)page.changeSlug:after hook (#1952)widont() helper when the last word contains a dash (#1902)$position parameter in the page.changeStatus:before hook is now filled in correctly at all times (#1982)Nothing published for this version
Nothing published for this version
Page titles, filenames and usernames are now trimmed before they will be saved
+ symbol (#1946)num: date when the date handler is set to strftime (#1882)num: date with translations (#1886)SECURITY.md file to provide relevant information in case of security issuesCONTRIBUTING.mdNothing published for this version
This release improves the brute-force protection of the Panel. Unfortunately the protection didn't trigger when a valid email address, but an invalid
This release improves the brute-force protection of the Panel. Unfortunately the protection didn't trigger when a valid email address, but an invalid password was passed. This bug is now fixed.
We have also made further improvements to the brute-force protection. It now also applies to requests with HTTP Basic Auth. Additionally, it protects better from brute-force attacks carried out by botnets. You can read more about this feature and its limitations in the docs.
It is recommended to upgrade your Kirby 3 installation to Kirby 3.2.3 to benefit from the improved protection.
Thanks to Clemens Prill for reporting the issue.
Str::split with multi-char separator (#1753)V::email() and thus also in the panel (#1895)sortBy option in sections (#1913)Collection::sortArgs() method to create sortBy arguments from a stringNothing published for this version
This is a hotfix release for two regressions in 3.2.1. We are really sorry for missing them during the test phase!
This is a hotfix release for two regressions in 3.2.1. We are really sorry for missing them during the test phase!
Min and max options in the date and datetime fields are now properly validated
Nothing published for this version
One column per quarter.