Skip to content

Releases: getkirby/kirby

3.1.2

09 Apr 12:33
Compare
Choose a tag to compare
  • The image() helper uses the current $page if no path is specified
  • API routes can be defined as callbacks in plugins
  • Emails can have an HTML template only without the requirement for a text template
  • The Number field no longer strips negative sign when typing -0
  • The wrong order of files in API responses is fixed
  • Falsely translated field options in select fields, checkboxes, etc. are fixed
  • The unnecessary overflow on the login view is gone
  • Setting an empty value in time fields is working as expected
  • The time field preview is fixed in structure fields
  • You can now set a white image background for icons in sections
  • Sorting files in paginated files sections is fixed
  • The search button is no longer hidden in unregistered installations
  • Textarea dialogs (email, links) can now be closed without creating unwanted tags
  • Regex characters are correctly escaped in the multiselect field
  • Content is now kept when programmatically creating users
  • $page→previewUrl() can now handle query strings in blueprint definitions correctly
  • $file→modified() returns the correct timestamp when the content has been modified
  • The min requirement message in pages sections is fixed
  • The svg() helper is now working reliably with OPcache and also avoids loading PHP code
  • Url setting, translations and other custom props are no longer deleted when saving languages
  • The pages cache is now automatically disabled when there are params in the URL. This also fixes pagination issues when caching is enabled.
  • Default values for structure fields work reliably now
  • The template switcher now works in multi-language installations without data-loss.
  • Finding users by email is now case insensitive
  • Setting a min value for the following fields now also implies that the field is required:
    • checkboxes, tags, structure, users, pages, files
  • Setting required: true for the fields above now also implies min: 1

3.1.1

26 Mar 09:55
Compare
Choose a tag to compare

This is a small patch release for an issue in multi-language setups. If the URL for the default language is set to /, switching languages became impossible. This release will fix that. We recommend this patch for all multi-language setups.

Single-language installations are not affected.

3.1.0 – Chamaeleo

19 Mar 14:52
Compare
Choose a tag to compare

Conditional fields

Only display fields in the Panel if their when option is fulfilled.

fields:
  category:
    label: Category
    type: select
    options:
      a: A
      b: B
      c: C
      other: Other …
  other:
    label: Enter your category
    type: text
    when:
      category: other

This opens up a lot of new possibilities for Panel layouts:

Conditional fields

Learn more about conditional fields …

New file upload and select button for the textarea field

You can now add images and other files to your textareas with the new file button and drag & drop uploads.

File Button

Define the button behavior with the files and uploads options:

textarea:
  type: textarea
  files: page.images
  uploads: textarea-upload

Drag & Drop upload

Or fetch files from anywhere, upload them to specific pages and assign a specific template:

textarea:
  type: textarea
  files:
    query: site.find("media").files.template("textarea-upload")
    image:
      cover: true
  uploads:
    parent: site.find("media")
    template: textarea-upload

You can also deactivate file uploads:

textarea:
  type: textarea
  uploads: false

Learn more about the new file button …

Native srcset generation

The new $image->srcset() handles all the hard work of creating srcsets for responsive images and also takes care of resizing the different versions with our media API.

<img
  src="<?= $image->url() ?>"
  srcset="<?= $image->srcset([300, 800, 1024]) ?>"
  alt="<?= $image->alt() ?>">

You can also modify the width definiton

$image->srcset([
    800  => '1x',
    1600 => '1.5x'
]);

To simplify srcset definitions across a site you can set them up in your config

<?php

return [
    'thumbs' => [
        'srcsets' => [
            'default' => [300, 800, 1024],
            'cover'   => [800, 1024, 2048]
        ]
    ]
];

… and then use it in your templates …

// default
$image->srcset()
    
// particular preset
$image->srcset('cover')

Learn more about srcset …

Help text for pages and files sections

You can now add help text to your sections to guide your editors with additional information.

section-help-example

sections:
  gallery:
    headline: Gallery
    type: files
    help: Images should have a ratio of about 3/2 to look best

User search

You can now switch between the global page and user search to jump to the right place from anywhere in an instant.

search

Nested collections

The new global collections in v3 are a great way to keep your controllers and templates clean. Now you can organize them even better with nested collections. Create subfolders in /site/collections to group collection files and use them later like this …

$articles = collection('articles/latest');

Inline KirbyText

We received a lot of requests to provide an additional method to parse KirbyText and Markdown without wrapping everything in <p> tags. There was even a plugin for v2, which solved this. We are happy that this feature has finally reached the core.

<p class="intro">
  <?= $page->intro()->kirbyTextInline() ?>
</p>

To parse any kind of string, you can use the kirbyTextInline($string) helper. If you want to save some time while typing, you can use the $field->kti() and kti() shortcuts instead.

New public search API endpoints for pages and users

There are two new official API endpoints to search for pages and users:

GET /api/site/search?q=
GET /api/users/search?q=

More fixes and enhancements

  • More selectable fields for files in API responses (panelUrl, panelImage, panelIcon, dragText)
  • Better loading indicator for all requests
  • New attachment icon
  • Improved PR template
  • Prevent users without password from logging in.
  • translate: false is no longer ignored in structure fields
  • Fixed search: false option for multiselect fields
  • The link tag no longer ignores non-default languages
  • Plugin assets are now correctly displayed even when symlinks don't work
  • Field method calls are now case insensitive. It not longer matters if you call $field→kirbytext() or $field→kirbyText()
  • $kirby→collection() now returns a clone of the collection to avoid global mutations.
  • Fixed changing page titles in the panel
  • The headline dropdown in textareas closes correctly now
  • Kirby now throws a proper exception when the home page does not exist
  • The ImageMagick driver will now log when the command failed.
  • More stable file preview layout
  • Merged UI kit and panel components
  • Fixed $item->toDate() on Structure objects
  • Request::ajax() is now marked as deprecated and should no longer be used
  • The upload component now returns the API response as second argument in the success event.
<template>
    <k-upload @success="onSuccess" />
</template>

<script>
export default {
    methods: {
        onSuccess (uploads, response) {
            // i.e. 
            response[0].type;
            response[0].filename;
            response[0].niceSize;
            // etc.
        }
    }
}
</script>

3.0.3

05 Mar 09:51
Compare
Choose a tag to compare
  • Add Spanish (Latin America)
  • Update translations (cs, el, fa, ko)
  • Add icon specific type class to the icon component
  • Allow PHP 7.1.0 (exact version)
  • Fix Kirby singleton issue for plugins
  • The rel attribute in HTML::a() will now overwrite predefined noopener and noreferrer values when a target is defined.
  • The title and description in user blueprints can now be translated correctly.
title: 
  en: Client
  de: Kunde
description: 
  en: The client can edit all pages
  de: Der Kunde kann alle Seiten bearbeiten
  • Thumb presets from v2 are back. You can define them like this in your config
<?php 

return [
    'thumbs' => [
        'presets' => [
            'default' => ['width' => 1024, 'quality' => 80],
            'blurred' => ['blur' => true]
        ]
    ]
];

… and use them afterwards …

// default
$file->thumb()

// preset
$file->thumb('blurred')
  • Fix panel redirect with custom Urls after installing the panel assets for the first time.
  • Fix empty option in all sections and fields
  • Add empty option to users field and structure field
  • Fix links to images/files when dragging files from other pages into textareas
  • Better pagination dropdown
    bildschirmfoto 2019-02-26 um 12 11 45
  • Avoid listed Page condition duplication in Page::isUnlisted()
  • Content representations now work in multilingual installation with default language set to '/'
  • Set locale correctly on homepage when default language has url set to '/'
  • Fix more localized float issues for number and range fields
  • Fix missing field setup when switching tabs
  • Avoid duplicate HTTP requests in the panel
  • Avoid pre-filling nested structure fields by default
  • New $this→next() handler in routes to jump to the next applicable route.
return [
    'routes' => [
        [
            'pattern' => '(:any)',
            'action'  => function ($slug) {

                if ($page = page('photography')->find($slug)) {
                    return page($page);
                }

                $this->next();

            }
        ]
    ]
];
  • Pages::find() now finds the right page even when you pass an extension in the path (i.e. page('blog/feed.json'))
  • Improve test coverage (75.63% → 78.09%)
  • Fix the toggle field in Safari
  • Fix float detection in the YAML encoder on Windows
  • Fix focus issue in Input component

3.0.2

19 Feb 15:38
Compare
Choose a tag to compare
  • Better error handling in error boundaries
  • Fix default column prop in UrlPreviewComponent
  • Fix renaming files with the same name but different extension
  • Fix loading absolute file paths in svg() helper
  • Fix problem saving floats in number and range fields
  • Fix emoji alignment on high-res screens
  • Bring back the „create from title“ button when changing a page url
  • Fix for Blueprint datetime usage
  • Create CONTRIBUTING.md guide
  • Move README.md to .github subfolder
  • Add issue and PR templates
  • Fix pages section templates option
  • Files field: update when file gets deleted
  • Fix finding files with $kirby→file() relative to other files
  • Remove language.created translation from source
  • Update Finish translation
  • Update Italian translation
  • Update Dutch translation
  • Add api.allowInsecure option to disable the SSL requirement for API calls
  • Fix creating new Collection from array
  • Fix Page::modified() issues with custom date handler and no format
  • Use semantic versioning for Composer installer
  • Fix case sensitivity in load() helper
  • Fix Page::isDescendantOf() with string argument
  • Fix passing values as callbacks in Page::update(), File::update(), User::update() and Site::update().
  • Re-implement missing Asset class and add new asset() helper
  • Remove empty elements when passing attribute values as array to the Html::attr() method
  • Remove deprecated $kirby→root('emails')
  • Fix missing Field::model() method
  • Fix „Open“ button in the panel when the url is set to / in the config
  • Avoid logout when a blueprint throws an error

3.0.1

05 Feb 10:25
Compare
Choose a tag to compare
  • Correctly load missing "empty" section mixin
  • Update reference docs links in fatal error screen and error response
  • Fix drag & drop sorting for plugins in Safari
  • Fix missing slash before params in URLs
  • Disable the draft status for home and error pages
  • Fix broken language editing modal
  • Fix broken slug dependency in page blueprint
  • Use the max number of siblings as default sorting number for a status change
  • Fix relative queries in files field
  • Update translations
  • Add Slovak translation
  • Add Polish translation
  • Add Finish translation
  • Add Greek translation
  • Add Spanish translation
  • Add Persian translation
  • Add Norwegian translation
  • Add Portuguese (Portugal) translation
  • Add Czech translation
  • Add Indonesian translation
  • Fix broken Page::isChildOf method when used with page on first level
  • Better error message when the panel cannot connect to the API or a syntax error is thrown in the backend
  • Reimplement lang attribute in (link: ) tag, in url() helper and Url::to() method
  • Fix before and after options for the url previews in structure fields
  • Add proper noscript warning for the panel
  • Fix passing debug option to Panel
  • Fix inserting empty values in number fields
  • Fix Urls for subpages of the home page

3.0.0

05 Feb 10:19
Compare
Choose a tag to compare

Kirby 3 has landed

  • New panel
  • Drafts & custom publishing workflows
  • New plugin system
  • REST API
  • Virtual pages

... and so much more. See what's new in v3!