Releases: craftcms/cms
Releases · craftcms/cms
5.2.0-beta.1
Content Management
- Live Preview now supports tabs, UI elements, and tab/field conditions. (#15112)
- Live Preview now has a dedicated “Save” button. (#15112)
- It’s now possible to edit assets’ alternative text from the Assets index page. (#14893)
- Double-clicking anywhere within a table row on an element index page will now open the element’s editor slideout. (#14379)
- Element index checkboxes no longer have a lag when deselected, except within element selection modals. (#14896)
- Relational field condition rules no longer factor in the target elements’ statuses or sites. (#14989)
- Element cards now display provisional changes, with an “Edited” label. (#14975)
- Improved mobile styling. (#14910)
- Improved the look of slideouts.
- Table views within element index pages are no longer scrolled directly. (#14927)
- Improved the look of user gradicons when selected.
- “Save and continue editing” actions now restore the page’s scroll position on reload.
- “Remove” element actions within relational fields will now remove all selected elements, if the target element is selected. (#15078)
- Action menus are now displayed within the page toolbar, rather than in the breadcrumbs. (#14913, #15070)
- Site menus within element selector modals now filter out sites that don’t have any sources. (#15091)
- The meta sidebar toggle has been moved into the gutter between the content pane and meta sidebar. (#15117)
Accessibility
- Added the “Status” column option to category, entry, and user indexes. (#14968)
- Element cards now display a textual status label rather than just the indicator. (#14968)
- Darkened the color of page sidebar toggle icons to meet the minimum contrast for UI components.
- Darkened the color of context labels to meet the minimum contrast for text.
- Darkened the color of footer links to meet the minimum contrast for text.
- Set the language of the Craft edition in the footer, to improve screen reader pronunciation for non-English languages.
- The accessible name of “Select site” buttons is now translated to the current language.
Administration
- Added the
--format
option to thedb/backup
anddb/restore
commands for PostgreSQL installs. (#14931) - The
db/restore
command now autodetects the backup format for PostgreSQL installs, if--format
isn’t passed. (#14931) - The
install
command and web-based installer now validate the existing project config files at the outset, and abort installation if there are any issues. - The
resave/entries
command now has an--all-sections
flag. - The web-based installer now displays the error message when installation fails.
- Edit Entry Type pages now have a “Delete” action. (#14983)
- After creating a new field, field layout designers now set their search value to the new field’s name. (#15080)
- GraphQL schema edit pages now have a “Save and continue editing” alternate action.
- Volumes’ “Subpath” and “Transform Subpath” settings can now be set to environment variables. (#15087)
- The system edition can now be defined by a
CRAFT_EDITION
environment variable. (#15094) - The rebrand assets path can now be defined by a
CRAFT_REBRAND_PATH
environment variable. (#15110)
Development
- Added the
{% expires %}
tag, which simplifies setting cache headers on the response. (#14969) - Added the
withCustomFields
element query param. (#15003) - Entry queries now support passing
*
to thesection
param, to filter the results to all section entries. (#14978) - Element queries now support passing an element instance, or an array of element instances/IDs, to the
draftOf
param. - Added
craft\elements\ElementCollection::find()
, which can return an element or elements in the collection based on a given element or ID. (#15023) - Added
craft\elements\ElementCollection::fresh()
, which reloads each of the collection elements from the database. (#15023) craft\elements\ElementCollection::contains()
now returnstrue
if an element is passed in and the collection contains an element with the same ID and site ID; or if an integer is passed in and the collection contains an element with the same ID. (#15023)craft\elements\ElementCollection::countBy()
,collapse()
,flatten()
,keys()
,pad()
,pluck()
, andzip()
now return anIlluminate\Support\Collection
object. (#15023)craft\elements\ElementCollection::diff()
andintersect()
now compare the passed-in elements to the collection elements by their IDs and site IDs. (#15023)craft\elements\ElementCollection::flip()
now throws an exception, as element objects can’t be used as array keys. (#15023)craft\elements\ElementCollection::map()
andmapWithKeys()
now return anIlluminate\Support\Collection
object, if any of the mapped values aren’t elements. (#15023)craft\elements\ElementCollection::merge()
now replaces any elements in the collection with passed-in elements, if their ID and site ID matches. (#15023)craft\elements\ElementCollection::only()
andexcept()
now compare the passed-in values to the collection elements by their IDs, if an integer or array of integers is passed in. (#15023)craft\elements\ElementCollection::unique()
now returns all elements with unique IDs, if no key is passed in. (#15023)
Extensibility
- Improved type definitions for
craft\db\Query
, element queries, andcraft\elements\ElementCollection
. - Added
craft\base\NestedElementTrait::$updateSearchIndexForOwner
. - Added
craft\db\getBackupFormat()
. - Added
craft\db\getRestoreFormat()
. - Added
craft\db\setBackupFormat()
. - Added
craft\db\setRestoreFormat()
. - Added
craft\enums\Color::tryFromStatus()
. - Added
craft\events\InvalidateElementcachesEvent::$element
. - Added
craft\fields\BaseRelationField::existsQueryCondition()
. - Added
craft\helpers\Cp::componentStatusIndicatorHtml()
. - Added
craft\helpers\Cp::componentStatusLabelHtml()
. - Added
craft\helpers\Cp::statusLabelHtml()
. - Added
craft\helpers\DateTimeHelper::relativeTimeStatement()
. - Added
craft\helpers\DateTimeHelper::relativeTimeToSeconds()
. - Added
craft\helpers\ElementHelper::swapInProvisionalDrafts()
. - Added
craft\helpers\StringHelper::indent()
. - Added
craft\models\Volume::getTransformSubpath()
. - Added
craft\models\Volume::setTransformSubpath()
. - Added
craft\queue\Queue::getJobId()
. craft\base\Element::defineTableAttributes()
now returns common attribute definitions used by most element types.craft\elements\ElementCollection::with()
now supports collections made up of multiple element types.craft\models\Volume::getSubpath()
now has a$parse
argument.craft\services\Drafts::applyDraft()
now has a$newAttributes
argument.- Added the
reloadOnBroadcastSave
setting toCraft.ElementEditor
. (#14814) - Added the
waitForDoubleClicks
setting toGarnish.Select
,Craft.BaseElementIndex
, andCraft.BaseElementIndexView
.
System
- Improved overall system performance. (#15003)
- Improved the performance of
exists()
element queries. - Improved the performance of
craft\base\Element::toArray()
. - The Debug Toolbar now pre-serializes objects stored as request parameters, fixing a bug where closures could prevent the entire Request panel from showing up. (#14982)
- Batched queue jobs now verify that they are still reserved before each step, and before spawning additional batch jobs. (#14986)
- The search keyword index is now updated for owner elements, when a nested element is saved directly which belongs to a searchable custom field.
- Updated Yii to 2.0.50. (#15124)
- Updated inputmask to 5.0.9.
5.1.8
- Added
craft\helpers\Gql::isIntrospectionQuery()
. craft\helpers\Html::id()
now allows IDs to begin with numbers. (#15066)- Fixed a bug where some condition rules weren’t getting added when applying project config changes, if they depended on another component which hadn’t been added yet. (#15037)
- Fixed a bug where entry type condition rules prefixed their option labels with section names. (#15075)
- Fixed a bug where GraphQL queries could be misidentified as introspection queries. (#15100)
- Fixed an error that could occur when calling
craft\base\FieldLayoutComponent::getAttributes()
if the$elementType
property wasn’t set yet. (#15074) - Fixed a bug where nested entry titles weren’t getting included in the owner element’s search keywords. (#15025)
- Fixed a bug where
craft\elements\Address::toArray()
would include asaveOwnership
key in its response array. - Fixed a bug where nested entry and address edit pages could have a “Delete for site” action.
- Fixed a bug where field layout designers weren’t displaying native fields in the library pane when a tab was removed that contained them. (#15064)
- Fixed a bug where recent textual changes could be lost when creating a new inline-editable Matrix block, if the block was created before the autosave had a chance to initiate. (#15069)
- Fixed a bug where the
users/create
command would fail without explaining why, when the maximum number of users had already been reached. - Fixed a validation error that could occur when saving an entry on Craft Solo. (#15082)
- Fixed an error that could occur on an element edit page, if a Matrix field’s Propagation Method was set to “Custom…”, but its Propagation Key Format wasn’t filled in.
- Fixed a bug where Matrix block invalidation errors weren’t getting grouped by block when set on the parent element, for blocks that didn’t have
uid
values. (#15103) - Fixed a bug where auto-generated entry titles weren’t getting validated to ensure they weren’t too long. (#15102)
- Fixed a bug where field conditions weren’t working reliably for nested entries within Matrix fields set to the inline-editable blocks view mode. (#15104)
- Fixed a bug where the
serve
command could hang. (#14977) - Fixed a bug where nested entry edit pages would always redirect to the Entries index, even if they were nested under a different element type. (#15101)
- Fixed an error that occurred when attempting to delete a global set without a field layout. (#15123)
4.10.0-beta.1
Content Management
- Relational field condition rules no longer factor in the target elements’ statuses or sites. (#14989)
- “Save and continue editing” actions now restore the page’s scroll position on reload.
Administration
- Added the
--format
option to thedb/backup
anddb/restore
commands for PostgreSQL installs. (#14931) - The
db/restore
command now autodetects the backup format for PostgreSQL installs, if--format
isn’t passed. (#14931) - The
install
command and web-based installer now validate the existing project config files at the outset, and abort installation if there are any issues. - The web-based installer now displays the error message when installation fails.
- GraphQL schema edit pages now have a “Save and continue editing” alternate action.
- The system edition can now be defined by a
CRAFT_EDITION
environment variable. (#15094) - The rebrand assets path can now be defined by a
CRAFT_REBRAND_PATH
environment variable. (#15110)
Development
- Added the
{% expires %}
tag, which simplifies setting cache headers on the response. (#14969) - Added
craft\elements\ElementCollection::find()
, which can return an element or elements in the collection based on a given element or ID. (#15023) - Added
craft\elements\ElementCollection::fresh()
, which reloads each of the collection elements from the database. (#15023) craft\elements\ElementCollection::contains()
now returnstrue
if an element is passed in and the collection contains an element with the same ID and site ID; or if an integer is passed in and the collection contains an element with the same ID. (#15023)craft\elements\ElementCollection::countBy()
,collapse()
,flatten()
,keys()
,pad()
,pluck()
, andzip()
now return anIlluminate\Support\Collection
object. (#15023)craft\elements\ElementCollection::diff()
andintersect()
now compare the passed-in elements to the collection elements by their IDs and site IDs. (#15023)craft\elements\ElementCollection::flip()
now throws an exception, as element objects can’t be used as array keys. (#15023)craft\elements\ElementCollection::map()
andmapWithKeys()
now return anIlluminate\Support\Collection
object, if any of the mapped values aren’t elements. (#15023)craft\elements\ElementCollection::merge()
now replaces any elements in the collection with passed-in elements, if their ID and site ID matches. (#15023)craft\elements\ElementCollection::only()
andexcept()
now compare the passed-in values to the collection elements by their IDs, if an integer or array of integers is passed in. (#15023)craft\elements\ElementCollection::unique()
now returns all elements with unique IDs, if no key is passed in. (#15023)
Extensibility
- Improved type definitions for
craft\db\Query
, element queries, andcraft\elements\ElementCollection
. - Added
craft\db\getBackupFormat()
. - Added
craft\db\getRestoreFormat()
. - Added
craft\db\setBackupFormat()
. - Added
craft\db\setRestoreFormat()
. - Added
craft\events\InvalidateElementcachesEvent::$element
. - Added
craft\fields\BaseRelationField::existsQueryCondition()
. - Added
craft\helpers\DateTimeHelper::relativeTimeStatement()
. - Added
craft\helpers\DateTimeHelper::relativeTimeToSeconds()
. - Added
craft\helpers\StringHelper::indent()
. - Added
craft\queue\Queue::getJobId()
. craft\elements\ElementCollection::with()
now supports collections made up of multiple element types.- Added the
reloadOnBroadcastSave
setting toCraft.ElementEditor
. (#14814)
System
- Improved the performance of
exists()
element queries. - The Debug Toolbar now pre-serializes objects stored as request parameters, fixing a bug where closures could prevent the entire Request panel from showing up. (#14982)
- Batched queue jobs now verify that they are still reserved before each step, and before spawning additional batch jobs. (#14986)
- Updated Yii to 2.0.50. (#15124)
- Updated inputmask to 5.0.9.
- Updated punycode to 2.3.1.
4.9.6
- Added
craft\helpers\Gql::isIntrospectionQuery()
. - Fixed a bug where some condition rules weren’t getting added when applying project config changes, if they depended on another component which hadn’t been added yet. (#15037)
- Fixed a bug where the
craft\base\Element::EVENT_DEFINE_ADDITIONAL_BUTTONS
event wasn’t being respected for user edit pages. (#15095) - Fixed a bug where GraphQL queries could be misidentified as introspection queries. (#15100)
5.1.7
- Scalar element queries no longer set their
$select
property to the scalar expression, fixing an error that could occur when executing scalar queries for relation fields. (#15071) - Fixed an error that occurred when upgrading to Craft 5 if a Matrix block type didn’t have any fields.
- Fixed an error that occurred when upgrading to Craft 5 if any Matrix block rows had invalid
primaryOwnerId
values. (#15063)
5.1.6
5.1.5
- Scalar element queries now set
$select
to the scalar expression, and$orderBy
,$limit
, and$offset
tonull
, on the element query. (#15001) - Added
craft\fieldlayoutelements\TextareaField::inputTemplateVariables()
. - Fixed a bug where
craft\helpers\Assets::prepareAssetName()
wasn’t sanitizing filenames if$preventPluginModifications
wastrue
. - Fixed a bug where element queries’
count()
methods were factoring in thelimit
param when searching withorderBy
set toscore
. (#15001) - Fixed a bug where soft-deleted structure data associated with elements that belonged to a revision could be deleted by garbage collection. (#14995)
- Fixed a bug where element edit pages’ scroll positions weren’t always retained when automatically refreshed.
- Fixed a bug where the
up
command could remove component name comments from the project config YAML files, for newly-added components. (#15012) - Fixed a bug where assets’ Alternative Text fields didn’t expand to match the content height. (#15026)
- Fixed a bug where
craft\helpers\UrlHelper::isAbsoluteUrl()
was returningtrue
for Windows file paths. (#15043) - Fixed an error that occurred on the current user’s Profile screen if they didn’t have permission to access the primary site. (#15022)
- Fixed a bug where non-localizable elements’ edit screens were displaying a site breadcrumb.
- Fixed a bug where entry GraphQL queries weren’t available if only nested entry field queries were selected in the schema.
- Fixed a bug where chip labels could wrap unnecessarily. (#15000, #15017)
- Fixed a bug where date/time clear buttons could bleed out of their container. (#15017)
- Fixed an error that occurred when editing an element, if any field layout conditions referenced a custom field that was no longer included in the layout. (#14838)
- Fixed a “User not authorized to create this element.” error that could occur when creating a new entry within a Matrix field, if the field had Max Entries set. (#15015)
- Fixed a bug where nested entries weren’t showing up within Matrix fields set to the element index view mode, when viewing entry revisions. (#15038)
- Fixed the styling of element chips displayed within an element card. (#15044)
- Fixed styling issues with inline-editing within element indexes. (#15040, #15049)
- Fixed a bug where sticky scrollbars could stop working when switching between element index sources. (#15047)
4.9.5
- Scalar element queries now set
$select
to the scalar expression, and$orderBy
,$limit
, and$offset
tonull
, on the element query. (#15001) - Added
craft\fieldlayoutelements\TextareaField::inputTemplateVariables()
. - Fixed a bug where
craft\helpers\Assets::prepareAssetName()
wasn’t sanitizing filenames if$preventPluginModifications
wastrue
. - Fixed a bug where element queries’
count()
methods were factoring in thelimit
param when searching withorderBy
set toscore
. (#15001) - Fixed a bug where soft-deleted elements that belonged to a revision could be deleted by garbage collection. (#14995)
- Fixed a bug where soft-deleted structure data associated with elements that belonged to a revision could be deleted by garbage collection. (#14995)
- Fixed a bug where element edit pages’ scroll positions weren’t always retained when automatically refreshed.
- Fixed a bug where the
up
command could remove component name comments from the project config YAML files, for newly-added components. (#15012) - Fixed a bug where assets’ Alternative Text fields didn’t expand to match the content height. (#15026)
- Fixed a bug where
craft\helpers\UrlHelper::isAbsoluteUrl()
was returningtrue
for Windows file paths. (#15043)
5.1.4
- Improved the performance of element indexes that contained asset thumbnails. (#14760)
- Table views within element index pages are no longer scrolled directly. (#14927, #15010)
- Fixed a bug where
craft\elements\db\ElementQuery::exists()
would returntrue
ifsetCachedResult()
had been called, even if an empty array was passed. - Fixed an infinite recursion bug that could occur when
craft\web\Response::redirect()
was called. (#15014) - Fixed a bug where
eagerly()
wasn’t working when a custom alias was passed in. - Fixed an error that occurred on users’ Addresses screens. (#15018)
- Fixed a bug where asset chips’ content wasn’t spanning the full width for Assets fields in large thumbnail mode. (#14993)
- Fixed infinite scrolling on Structure element sources. (#14992)
- Fixed right-to-left styling issues. (#15019)
4.9.4
- Fixed a bug where
craft\elements\db\ElementQuery::exists()
would returntrue
ifsetCachedResult()
had been called, even if an empty array was passed. - Fixed a bug where it wasn’t possible to interact with disabled Matrix blocks. (#15002)
- Fixed an infinite recursion bug that could occur when
craft\web\Response::redirect()
was called. (#15014)