Skip to content

6.0.0-beta.3

Pre-release
Pre-release

Choose a tag to compare

@brandonkelly brandonkelly released this 01 Dec 23:34
· 0 commits to 5.x since this release

Warning

Sites that set CRAFT_EPHEMERAL on a read-only filesystem should now turn off automatic project config YAML writes by calling writeYamlAutomatically(false) on CraftCms\Cms\ProjectConfig\ProjectConfig from a service provider, and make sure Laravel’s storage path is writable. With the Yii adapter installed, resourceBasePath should also point to a writable directory, or the assetManager component should serve resources published at build time.

  • Brightened the live, pending, and expired status colors. (#20964)
  • Updated Twig to 3.31.1. (#21081)
  • GraphQL requests authenticated with OAuth access tokens now work while the system is offline, for users who can access the site or control panel while it’s offline.
  • OAuth access tokens now expire after one hour, and refresh tokens after 30 days, rather than one year. (#21165)
  • Improved the performance of searching and filtering element indexes. (#21170)
  • Improved the performance of entry indexes and of element indexes with thumbnails. (#21181, #21188, #21190, #21191)
  • Improved the performance of edit pages with many fields or nested entries. (#21077)
  • Improved the performance of autosaving entries with many nested entries. (#21199)
  • Improved the performance of edit pages with many callouts, button groups, and Button Group fields. (#21039, #21065)
  • Improved the responsiveness of large control panel pages, which no longer restyle every element whenever content is added or a class or inline style changes. (#21039, #21150, #21125)
  • Improved the performance of autosaving and saving entries on MySQL. (#21180, #21187)
  • Added a global footer to the control panel, with the global navigation’s Collapse/Expand button, Craft’s version and edition, Dev Mode and Maintenance Mode badges, and Ask AI. (#21226)
  • Ask AI now opens in a popover from the global footer, and is a details panel only in element editor slideouts and Live Preview. (#21226)
  • AI chats can now be resized, and minimized to the global footer, which also has a chat history menu. (#21226)
  • The About Craft CMS menu now opens from Craft’s version in the global footer. (#21226)
  • Control panel pages’ content panes now scroll on their own, between the header and the global footer. (#21226)
  • Content footers now stay at the bottom of the content pane on pages with little content. (#21226)
  • The collapsed global navigation is now narrower. (#21226)
  • Element indexes now load their rows along with the page, rather than showing placeholders first. (#21156)
  • Slideouts now slide in, and step aside for the next one, smoothly while their content renders, easing into place. (#21155, #21157)
  • Element selector modals are now taller by default. (#21067)
  • Element selector, Customize Sources, stack trace, and element deletion modals now remember the size they were resized to. (#21045, #21067)
  • Navigation section headings and the items after expanded subnavs now have more space above them. (#21102)
  • Navigation chevrons are now a step lighter than their labels. (#21102)
  • Breadcrumbs that don’t fit now collapse into a menu, keeping the first and last crumbs for as long as there’s room, rather than overflowing. (#20908)
  • Slideouts for control panel screens that also work as pages of their own now have an “Open in a new tab” button. (#21098)
  • Every user account screen now shows the user’s status and action menu, like the Profile screen does. (#20888)
  • Deleting configuration in the control panel now lists where it’s used and what the deletion affects. (#21104, #21141, #21229)
  • Soft-deleting elements no longer asks for a second confirmation after the deletion blockers modal. (#21104, #21141)
  • Added keyboard shortcuts for collapsing and expanding the global navigation (Command/Ctrl + </kbd>) and a page’s sidebar (Command/Ctrl + Shift + </kbd>). They leave focus where it is, and announce the change to screen readers. (#21160)
  • Full pages now remember when their sidebar was collapsed, and open later pages with it collapsed too, until a sidebar panel is opened again. (#21160)
  • Command palette actions now show their keyboard shortcuts. (#21194)
  • Keyboard shortcut keys now take their colors from what they’re in. (#21194)
  • Scrollbars throughout the control panel are now thin and slate-colored. (#21287, #21293)
  • Garbage collection now runs daily while Laravel’s scheduler is running, rather than randomly during requests. (#21168)
  • The Yii2 Loose Ends utility now lists adapter usage by plugins installed from a local path, such as a Composer path repository. (#21241)
  • {% expires %} and Craft’s no-cache headers no longer send the legacy Expires and Pragma headers. (#20953)
  • csrfInput() no longer sets no-cache headers itself. Responses containing the CSRF token get them instead. (#20953)
  • Craft now sends an X-Robots-Tag: none header for requests with a site token. (#21283)
  • When public registration takes over an existing inactive user account, the user is now removed from the user groups it belonged to before being assigned to the default user group(s).
  • Asset filenames can no longer be changed by posting a filename param when saving an asset. newFilename should be used instead.
  • Assets can now only be saved with a new location in another volume, such as via newLocation on elements/save, if the user has permission to save assets in that volume.
  • Element index inline editing now rejects requests that post an element’s id, uid, or canonicalId.
  • The authenticated MCP server’s element listing and search tools now ignore criteria that aren’t element query params or custom field handles, and only accept orderBy values made of column names with an optional asc or desc.
  • Added the element_sources_get and element_sources_save MCP tools, for reading and saving element index sidebars. (#21112)
  • Added the condition_schema MCP tool, which lists the rules a condition accepts for custom sources, field layout visibility, and relation field selection. (#21112)
  • The configuration_* MCP tools now reject condition rules that Craft would drop, and accept field layouts in the shape configuration_get returns them. (#21112)
  • The authenticated MCP server now tells clients of users without control panel access to read the AI guidance and skills before writing content. (#21268)
  • Added the assets_view and assets_download_url MCP tools, which return scaled images of assets and single-use download URLs. (#21252)
  • Added the serverInstructions MCP config setting, which adds site guidance to the instructions MCP clients receive when they connect. (#21175, #21270)
  • MCP tools now delete Matrix entries only when they’re listed in the field’s new delete value, and reject sortOrder values that leave out existing entries, including within nested Matrix fields. (#21176, #21271)
  • The elements_create and elements_update MCP tools now return the nested entries of the Matrix fields they saved. (#21176, #21271)
  • Added the nested_entries_move MCP tool, which moves a nested entry within its field or into another owner’s Matrix field. (#21176, #21271)
  • MCP nested element summaries now include titles and entry type handles. (#21176, #21271)
  • The configuration_delete and elements_delete MCP tools now return the control panel’s deletion blockers, and require an acknowledgement before deleting. (#21230)
  • Added the transferContentTo and replaceRelationsWith arguments to the elements_delete MCP tool. (#21230)
  • The configuration_* MCP tools now accept a scope argument. (#21228)
  • {% cache %} tags and cached GraphQL results now refresh when an entry they could include goes live or expires, without a scheduled job. (#978, #9170, #11743, #16038)
  • Added the output argument to the @formatDateTime GraphQL directive. It can be set to date or time to output only the date or time, using the locale’s date or time format for short, medium, long, and full. (#21084)
  • Added the assertCpMessage(), assertNoCpMessages(), and cpMessages() Illuminate\Testing\TestResponse macros, for testing the control panel messages a response delivers. (#21161)
  • Garnish.scrollContainer (from @craftcms/garnish) and the Yii2 adapter’s Garnish.$scrollContainer are now the content pane, rather than the window, from the lg breakpoint up. (#21226)
  • Added CraftCms\Cms\Http\ViewModels\Attributes\UnaffectedByFilters. (#21170)
  • Added CraftCms\Cms\Element\Queries\ElementQuery::nextColumnDate() and nextStatusChangeDate().
  • Added the $withStatusChanges argument to CraftCms\Cms\Element\ElementCaches::startCollectingCacheInfo().
  • While GraphQL caching is disabled, GraphQL requests don’t look up when entries go live or expire, so CraftCms\Cms\Gql\Events\ExecutedGqlQuery::$cacheDuration leaves those out.
  • Added CraftCms\Cms\Http\ResponseHeaders::cacheControl(). (#20953)
  • Added CraftCms\Cms\Http\Events\LazySessionSaved. (#20953)
  • Added Craft.Grid::queueRefreshCols(). (#21062)
  • Added CraftCms\Cms\Ui\Controls\Number::locale(). (#21080, #21107)
  • CraftCms\Cms\Queue\BatchedJob subclasses can now process items from any data source by overriding loadData(). (#21164)
  • Added CraftCms\Cms\Queue\ArrayBatcher. (#21164)
  • Added CraftCms\Cms\Queue\BatchedJob::data() and loadData(). (#21164)
  • Added CraftCms\Cms\Queue\Contracts\Batchable. (#21164)
  • Added CraftCms\Cms\Queue\CsvBatcher. (#21164)
  • Added CraftCms\Cms\Queue\JsonlBatcher. (#21171)
  • Added CraftCms\Cms\Queue\QueryBatcher. (#21164)
  • Deprecated craft\base\Batchable. CraftCms\Cms\Queue\Contracts\Batchable should be used instead. (#21164)
  • Added CraftCms\Cms\DeletionBlocker\BlockerRegistry and SubjectTypeRegistry. (#21104, #21141)
  • Added CraftCms\Cms\DeletionBlocker\BaseResolvableDeletionBlocker and CraftCms\Cms\DeletionBlocker\Contracts\ResolvableDeletionBlockerInterface. (#21104, #21141)
  • Added CraftCms\Cms\DeletionBlocker\ConditionReferencesBlocker, EntryTypeUsageBlocker, FieldUsageBlocker, SiteSectionsBlocker, SourceUsageBlocker, TrashedElementsBlocker, UserGroupUsageBlocker, and UserPhotoVolumeBlocker. (#21104, #21141, #21229)
  • Added CraftCms\Cms\Field\Fields::countElementsWithValues(). (#21104, #21141)
  • Added CraftCms\Cms\Ui\Nodes\Table::deletionBlockers(). (#21104, #21141)
  • Added the deletionBlockers option to @craftcms/ui HTTP actions. (#21104, #21141)
  • Added Craft.DeletionBlockersModal. (#21104, #21141)
  • Craft.ElementDeletionManager now extends Craft.DeletionBlockersModal. (#21104, #21141)
  • Craft.EntryMover now accepts a settings argument, and its elementIndex argument can be null. (#21104, #21141)
  • Added CraftCms\Cms\Mcp\Configuration\ConfigurationTypeInterface and ConfigurationTypeRegistry, for adding configuration types to the configuration_* MCP tools. (#21228)
  • CraftCms\Cms\Mcp\Elements\BaseElementAdapter now handles drafts for element types that support them. (#21228)
  • Added CraftCms\Cms\Config\McpConfig::$serverInstructions and serverInstructions(). (#21270)
  • Added CraftCms\Cms\Element\Jobs\ReplaceRelations::create(). (#21231)
  • CraftCms\Cms\Asset\Assets::replaceAssetFile() now throws an exception if the filename’s extension isn’t allowed by the allowedFileExtensions config setting.
  • craft\elements\GlobalSet::canSave() now returns false for users who don’t have permission to edit the global set.
  • Removed the Response::setNoCacheHeaders() macro. CraftCms\Cms\Http\ResponseHeaders::setNoCacheHeaders() should be used instead. (#20953)
  • Removed CraftCms\Cms\Http\ResponseHeaders::$noCache, $duration, $replace, and $headers, and the $replace argument of ResponseHeaders::setCache(). (#20953)
  • Volumes’ fs setting has been renamed to disk, in project config, the volumes table, and the volume MCP tools. Existing project config is updated automatically, and project config that still uses fs can still be applied. (#20959)
  • Deprecated CraftCms\Cms\Asset\Data\Volume::$fsHandle, getFsHandle(), setFsHandle(), and getResolvedFsTarget(). $disk, getDisk(), setDisk(), and getResolvedDisk() should be used instead. (#20959)
  • Deprecated the fsHandle parameter of the volume MCP tools. disk should be used instead. (#20959)
  • Added CraftCms\Cms\Asset\Events\TransformGenerated. (#21050)
  • Deprecated CraftCms\Cms\Asset\Events\AfterGenerateTransform. TransformGenerated should be used instead. (#21050)
  • Deprecated setting general config settings with CRAFT_ environment variables. They should be set in config/craft/general.php instead, with env(). (#21018)
  • Added the gql config setting, which holds the GraphQL API’s settings as a CraftCms\Cms\Config\GqlConfig object, and replaces the enableGql, enableGraphqlIntrospection, enableGraphqlCaching, setGraphqlDatesToSystemTimeZone, gqlTypePrefix, prefixGqlRootTypes, lazyGqlTypes, maxGraphqlBatchSize, maxGraphqlComplexity, maxGraphqlDepth, and maxGraphqlResults config settings. They’re now gql.enabled, gql.enableIntrospection, gql.enableCaching, gql.setDatesToSystemTimeZone, gql.typePrefix, gql.prefixRootTypes, gql.lazyTypes, gql.maxBatchSize, gql.maxComplexity, gql.maxDepth, and gql.maxResults, and can be set with CRAFT_GQL or CRAFT_GQL_{SETTING} environment variables, such as CRAFT_GQL_MAX_DEPTH. The old settings and their environment variables still work, and log a deprecation warning. (#20930)
  • Added the images, backups, and queue config settings, which hold image, database backup, and queue settings as CraftCms\Cms\Config\ImagesConfig, BackupsConfig, and QueueConfig objects. They replace these config settings, which still work and log a deprecation warning. (#20930)
    • imageDriver, defaultImageQuality, imageEditorRatios, optimizeImageFilesize, preserveCmykColorspace, preserveExifData, preserveImageColorProfiles, rotateImagesOnUploadByExifData, transformGifs, transformSvgs, upscaleImages, and brokenImagePath, which are now images.driver, images.defaultQuality, images.editorRatios, images.optimizeFilesize, images.preserveCmykColorspace, images.preserveExifData, images.preserveColorProfiles, images.rotateOnUploadByExifData, images.transformGifs, images.transformSvgs, images.upscale, and images.brokenPath.
    • backupOnUpdate, backupCommand, backupCommandFormat, restoreCommand, and maxBackups, which are now backups.onUpdate, backups.command, backups.commandFormat, backups.restoreCommand, and backups.max.
    • runQueueAutomatically, queueName, lowPriorityQueueName, and trackedQueueNames, which are now queue.runAutomatically, queue.name, queue.lowPriorityName, and queue.trackedNames.
  • Added the assets config setting, which holds asset settings as a CraftCms\Cms\Config\AssetsConfig object. It replaces the allowedFileExtensions, extraAllowedFileExtensions, extraFileKinds, convertFilenamesToAscii, filenameWordSeparator, revAssetUrls, sanitizeSvgUploads, sanitizeCpImageUploads, trashedAssetDisk, tempAssetUploadDisk, uploadSessionDisk, uploader, uploadChunkSize, uploadSessionDuration, and maxUploadFileSize config settings, which are now assets.revUrls for revAssetUrls, assets.trashDisk for trashedAssetDisk, assets.tempUploadDisk for tempAssetUploadDisk, and assets.{setting} for the rest. The old settings and their environment variables still work, and log a deprecation warning. (#20930)
  • Added the templates and slugs config settings, which hold template and slug settings as CraftCms\Cms\Config\TemplatesConfig and SlugsConfig objects. They replace these config settings, which still work and log a deprecation warning. (#20930)
    • defaultTemplateExtensions, indexTemplateFilenames, partialTemplatesPath, privateTemplateTrigger, enableTemplateCaching, and compiledTemplatesPath, which are now templates.defaultExtensions, templates.indexFilenames, templates.partialsPath, templates.privateTrigger, templates.enableCaching, and templates.compiledPath.
    • allowUppercaseInSlug, limitAutoSlugsToAscii, slugWordSeparator, and maxSlugIncrement, which are now slugs.allowUppercase, slugs.limitAutoToAscii, slugs.wordSeparator, and slugs.maxIncrement.
  • Added the routing, security, users, and garbageCollection config settings, which hold routing, security, user, and garbage collection settings as CraftCms\Cms\Config\RoutingConfig, SecurityConfig, UsersConfig, and GarbageCollectionConfig objects. They replace these config settings, which still work and log a deprecation warning. (#20930)
    • actionTrigger, activateAccountSuccessPath, addTrailingSlashesToUrls, baseCpUrl, cpTrigger, invalidUserTokenPath, loginPath, logoutPath, pageTrigger, postCpLoginRedirect, postLoginRedirect, postLogoutRedirect, setPasswordPath, setPasswordRequestPath, setPasswordSuccessPath, siteToken, tokenParam, useSslOnTokenizedUrls, verifyEmailPath, and verifyEmailSuccessPath, which are now routing.actionTrigger, routing.activateAccountSuccessPath, routing.addTrailingSlashesToUrls, routing.baseCpUrl, routing.cpTrigger, routing.invalidUserTokenPath, routing.loginPath, routing.logoutPath, routing.pageTrigger, routing.postCpLoginRedirect, routing.postLoginRedirect, routing.postLogoutRedirect, routing.setPasswordPath, routing.setPasswordRequestPath, routing.setPasswordSuccessPath, routing.siteToken, routing.tokenParam, routing.useSslOnTokenizedUrls, routing.verifyEmailPath, and routing.verifyEmailSuccessPath.
    • authGuard, authPasswordBroker, cooldownDuration, defaultRateLimit, defaultRateLimitDuration, defaultTokenDuration, disable2fa, invalidLoginWindowDuration, maxInvalidLogins, preventUserEnumeration, previewTokenDuration, rememberUsernameDuration, and storeUserIps, which are now security.authGuard, security.authPasswordBroker, security.cooldownDuration, security.defaultRateLimit, security.defaultRateLimitDuration, security.defaultTokenDuration, security.disable2fa, security.invalidLoginWindowDuration, security.maxInvalidLogins, security.preventUserEnumeration, security.previewTokenDuration, security.rememberUsernameDuration, and security.storeUserIps.
    • autoLoginAfterAccountActivation, deferPublicRegistrationPassword, extraLastNamePrefixes, extraNameSalutations, extraNameSuffixes, oauthProviders, showFirstAndLastNameFields, and useEmailAsUsername, which are now users.autoLoginAfterAccountActivation, users.deferPublicRegistrationPassword, users.extraLastNamePrefixes, users.extraNameSalutations, users.extraNameSuffixes, users.oauthProviders, users.showFirstAndLastNameFields, and users.useEmailAsUsername.
    • activityRetentionDuration, purgePendingUsersDuration, purgeUnsavedDraftsDuration, and softDeleteDuration, which are now garbageCollection.activityRetentionDuration, garbageCollection.purgePendingUsersDuration, garbageCollection.purgeUnsavedDraftsDuration, and garbageCollection.softDeleteDuration.
  • Added the cp config setting, which holds control panel settings as a CraftCms\Cms\Config\CpConfig object. It replaces the accessibilityDefaults, cpHeadTags, cpIconPath, cpLogoPath, defaultCpLanguage, defaultCpLocale, disabledUtilities, and systemTemplateCss config settings, which are now cp.accessibilityDefaults, cp.headTags, cp.iconPath, cp.logoPath, cp.defaultLanguage, cp.defaultLocale, cp.disabledUtilities, and cp.systemTemplateCss. The old settings and their environment variables still work, and log a deprecation warning. (#20930)
  • Deprecated CraftCms\Cms\Config\GeneralConfig::getAuthGuard(), getAuthPasswordBroker(), getPasswordConfirmationKey(), getActivateAccountSuccessPath(), getVerifyEmailPath(), getVerifyEmailSuccessPath(), getInvalidUserTokenPath(), getLoginPath(), getLogoutPath(), getPostCpLoginRedirect(), getPostLoginRedirect(), getPostLogoutRedirect(), getSetPasswordPath(), getSetPasswordRequestPath(), getSetPasswordSuccessPath(), getPageTrigger(), and getPageTriggerParam(). The same methods on CraftCms\Cms\Config\SecurityConfig and RoutingConfig should be used instead. (#20930)
  • Deprecated CraftCms\Cms\Config\GeneralConfig::getTempAssetUploadDisk(), getUploadSessionDisk(), and getTrashedAssetDisk(). CraftCms\Cms\Config\AssetsConfig::getTempUploadDisk(), getUploadSessionDisk(), and getTrashDisk() should be used instead. (#20930)
  • Deprecated CraftCms\Cms\Config\GeneralConfig::getBackupOnUpdate() and the IMAGE_DRIVER_* constants. CraftCms\Cms\Config\BackupsConfig::shouldBackUpOnUpdate() and CraftCms\Cms\Config\ImagesConfig::DRIVER_* should be used instead. (#20930)
  • Config settings that hold config objects, such as mcp and anchors, now merge new values into their current settings instead of replacing them, whether they’re set with a config object, an array, or a JSON environment variable such as CRAFT_MCP. A config object only applies the settings it changes from their defaults. (#20930)
  • Removed the maxCachedCloudImageSize config setting and asset indexing’s “Cache remote images” option, including the --cacheRemoteImages CLI option. Remote image sources are no longer resized or retained between requests; transforms and image editing download originals as needed and delete the local copies afterward. Sites that opted into source caching may see more downloads, bandwidth use, and image-processing work. (#20983)
  • Image transform URLs generated by the craft asset transformer no longer change when their asset is saved without its file or focal point changing. (#20957)
  • Image transform URLs that Craft serves itself no longer have a v query param. (#20957)
  • Improved the performance of field layout designers. (#21062)
  • Form fields’ inner shadows are now shallower. (#21086)
  • Added the storage-key attribute to craft-dialog and craft-resize-grips, and the storageKey prop to ModalForm. (#21067)
  • Element saves, deletions, restorations, nested element reordering, and URI updates now invalidate each cache tag once per operation, and propagations once per element. Element cache tags invalidated inside a database transaction are now invalidated when it commits. (#21058)
  • Added CraftCms\Cms\Element\ElementCaches::deferInvalidations() and hasPendingInvalidations(). (#21058)
  • Added CraftCms\Cms\Cp\Alerts::areCached(). (#21108)
  • Control panel alerts can now have title, actions, and refreshable keys, which are shown in the alert’s heading and buttons. Plugins can pass them from CpAlertsResolving to show their links as buttons. (#21108)
  • CraftCms\Cms\License\License::issues() can now return a fourth item per issue, with link buttons for its alert. (#21108)
  • Element details panels registered with Cp.$elementDetailsPanels can now have a scrollsItself key, for components that scroll their own content. (#21248)
  • Fixed a bug where new entries showed an “Entry created.” message before they were saved. (#21253)
  • Fixed a bug where deleting items from control panel tables didn’t show a success message. (#21272)
  • Fixed a bug where badges in the Yii2 Loose Ends utility wrapped below long titles. (#21241)
  • Fixed a bug where element editors’ Activity panel’s scrollbar was inset from the panel’s edge, and didn’t match other panels’ scrollbars. (#21248, #21250)
  • Fixed a bug where drafts couldn’t be saved while a field had a value that wasn’t valid yet, such as an incomplete email address. (#21199)
  • Fixed an error that occurred when saving an incomplete email address. (#21199)
  • Fixed errors that occurred on MariaDB, including when upgrading from Craft 5 with the Yii adapter installed. (#21214, #21219)
  • Fixed a bug where each queue/run request kept running the queue after its response, until the site stopped responding. (#21208, #21212)
  • Fixed a bug where system messages sent to several users in one request or queue job were all in the first recipient’s language. (#21263, #21265)
  • Fixed a bug where relation field chips didn’t show related elements’ unsaved changes or an “Edited” label. (#21209, #21220)
  • Fixed a bug where {% cache %} tags and cached GraphQL results built with element queries’ exists(), ids(), pluck(), or aggregate methods weren’t refreshed when elements were saved.
  • Fixed a bug where control panel alerts weren’t shown on Inertia pages. (#21083, #21108)
  • Fixed a bug where licensing and critical update alerts could be missing from the control panel once the cached update info expired. (#21108)
  • Craft’s Twig tags and control panel templates no longer use features that Twig 3 deprecated, apart from the spaceless filter. (#21117)
  • CraftCms\Cms\Element\Queries\AssetQuery now has a template type for the asset class it returns, like EntryQuery, so static analysis can type queries for asset subclasses. (#21138)
  • Added CraftCms\Cms\Field\Assets::getUploadVolume(). (#21151)
  • Fixed a bug where images uploaded to a volume were reported as copies of images in other volumes. (#21151)
  • Fixed an error that occurred when moving entries to another section. (#21141)
  • Fixed a bug where macros imported within {% namespace %} tags weren’t available after the closing tag. (#21117)
  • Fixed a bug where Number fields’ inputs didn’t format their values for the user’s formatting locale. (#21080, #21107)
  • Fixed a bug where Json, Country, Range, Money, and Content Block fields’ phpType() methods didn’t describe their normalized values, so the custom field IDE helper declared the wrong types for them. (#21131)
  • Fixed a bug where relational and Matrix fields’ phpType() methods, and the custom field IDE helper’s Matrix types, specified only one of CraftCms\Cms\Element\ElementCollection’s two template types, and the phpType() methods didn’t specify their element queries’ template types, so PHPStan couldn’t tell which elements they contained. (#21131)
  • Fixed an error that occurred when a Range field was normalized from a non-numeric value. (#21131)
  • Fixed bugs where Markdown fields’ character counters covered the text and weren’t fully announced by screen readers. (#21069)
  • Fixed a bug where shared caches could store responses to token and site token requests. (#20953)
  • Fixed a bug where shared caches could store responses that saved or refreshed a lazy session. (#20953)
  • Fixed a bug where shared caches could store responses containing the session’s CSRF token, unless csrfInput() output it. (#20953)
  • Fixed a bug where {% header %} could make control panel, action, and preview responses cacheable. (#20953)
  • Fixed a bug where error pages got the cache headers that the failed page queued. (#20953)
  • Fixed a bug where ResponseHeaders::noCache() overrode cache headers set after it, such as by a later {% expires %} tag. (#20953)
  • Fixed a bug where concurrent transforms of the same remote image could fail because one deleted the downloaded source while another was still using it. (#20983)
  • Fixed a bug where renaming an asset folder left its assets’ image transforms behind, and transform URLs on non-local disks pointed to files that didn’t exist. (#21049)
  • Fixed a bug where renaming an asset folder didn’t clear element caches, such as {% cache %} tags, that held its assets’ old URLs. (#21049)
  • Fixed a bug where Plain Text fields’ “Enlarged” UI mode had no effect. (#21034)
  • Fixed a bug where CraftCms\Cms\Image\Events\DeletingTransformedImage::$path and the legacy craft\imagetransforms\ImageTransformer::EVENT_DELETE_TRANSFORMED_IMAGE event’s path used backslashes on Windows. (#21048)
  • Fixed a bug where CraftCms\Cms\Asset\Events\FolderCreating, FolderCreated, FolderRenaming, FolderRenamed, and FoldersDeleted were never dispatched. (#21050)
  • Fixed a bug where CraftCms\Cms\Asset\Events\TransformGenerating and AfterGenerateTransform, and the legacy craft\elements\Asset::EVENT_BEFORE_GENERATE_TRANSFORM and EVENT_AFTER_GENERATE_TRANSFORM events, only fired for legacy image transformers. (#21050)
  • Fixed a bug where PHP could crash when getting the URL or dimensions of a legacy craft\elements\Asset after calling setTransform(). (#21089)
  • Fixed a bug where Number and Money fields’ Size setting didn’t change their inputs’ width. (#21054, #21068)
  • Fixed a bug where Number fields didn’t show their prefix or suffix text. (#21060, #21063)
  • Fixed a bug where Plain Text fields with a character limit didn’t show how many characters were left. (#21066, #21076)
  • Fixed a bug where field layout elements’ width controls had uneven outlines at 125% and 150% display scaling. (#21071, #21078)
  • Fixed a bug where the configuration_* MCP tools couldn’t assign a workflow to a section. (#21042, #21051)
  • Fixed a bug where craft:users:create could create users with a username or email that was already taken. (#21040, #21052)
  • Craft no longer changes its behavior based on the CRAFT_EPHEMERAL environment variable. Temporary files now follow Laravel’s storage path, and automatic project config YAML writes and legacy asset publishing no longer depend on it. app()->isEphemeral() and craft\helpers\App::isEphemeral() are deprecated, and only available with the Yii adapter. (#20547)
  • The Project Config utility’s “Discard changes” action and the config sync’s “Use the loaded project config” option now show an error when the project config YAML files can’t be written, rather than failing with a server error. (#20547)
  • Error summaries shown when a save fails now show field names in bold, and each error links to its field, including custom fields and fields within settings screens’ scoped or sidebar layouts. Errors within Table fields’ cells, and within Matrix and Addresses fields shown as cards or an index, are no longer listed separately from their field’s own error, and the links are now at least 24px tall. (#20935)
  • The Yii2 Loose Ends utility now lists sites whose base URL uses the @web alias, which is only defined when the Yii adapter is installed. (#20989)
  • Eloquent element types and their relation fields are now available in GraphQL. (#21014)
  • Added CraftCms\Cms\Ui\Controls\Text::showCharsLeft() and CraftCms\Cms\Ui\Controls\Textarea::showCharsLeft(). (#21066, #21076)
  • Added the show-chars-left attribute to craft-input and craft-textarea. (#21066, #21076)
  • Added CraftCms\Cms\Element\Eloquent\EloquentElement::gqlScope() and gqlTypeName(). (#21014)
  • Added CraftCms\Cms\ProjectConfig\Exceptions\ProjectConfigWriteException, which CraftCms\Cms\ProjectConfig\ConfigStorage::writeYaml() throws when the YAML files can’t be written. (#20547)
  • Added CraftCms\Cms\Asset\Events\AssetFileChanged, CraftCms\Cms\Image\Events\DeletingTransformedImage::$disk, $url, and urls(), and CraftCms\Cms\Image\ImageTransformer::getTransformFolderUrl(). (#21048)
  • Added CraftCms\Cms\Asset\Events\FolderRenamed::$oldPath, $oldSubfolderPaths, and prefixes(), and CraftCms\Cms\Element\Events\ElementSlugAndUriUpdated::$oldUri and urls(). (#21048)
  • Added CraftCms\Cms\Validation\Concerns\LabelsAttributes, which gives validation rules the label of the attribute they’re validating, for the {attribute} placeholder in their messages, and CraftCms\Cms\Support\Str::stripEmphasis(). (#20935)
  • URLs generated with route() and action() for routes in the craft middleware group now use the current site’s base URL, and a site parameter generates them for another site. (#20988, #21015)
  • Added the rootOnly() route macro, for routes in the craft middleware group that should only match at the app’s root URL and keep it in their URLs. (#20988, #21015)
  • Added CraftCms\Cms\Route\Routes::getAllProjectConfigRoutes(). (#21015)
  • Added CraftCms\Cms\Cp\Components\Input::prefix() and CraftCms\Cms\Ui\Controls\Text::prefix(). (#21063)
  • Asset selector modals’ index adapters now have refresh() and selectElements() methods. (#21036)
  • Fixed a bug where queue workers kept every remote image they downloaded to generate transforms until the worker stopped, which could fill up local storage. Each one is now deleted when its job finishes. (#20803)
  • Fixed a bug where elements selected in Link fields weren’t shown as chips, and couldn’t be edited, copied, replaced, or removed from an action menu. (#21025)
  • Fixed a bug where files passed to craft\helpers\FileHelper::deleteFileAfterRequest() from a queued job weren’t deleted until the queue worker stopped. They’re now deleted when the job finishes.
  • Fixed a bug where the request that generated an image transform gave it a different URL than later requests did. (#20957)
  • Fixed a bug where Command/Ctrl + S didn’t save element editor slideouts opened from full-page element editors. (#21021)
  • Entry selection modals now show “New entry” buttons when the selection condition only has “Viewable”, “Savable”, “Section”, “Section Type”, and “Entry Type” rules, offering only the entry types those rules allow, in sections the user has permission to save entries in. A new entry that doesn’t meet the condition once it’s saved isn’t selected. (#20598)
  • Fixed an error that occurred on element indexes with inline editing enabled when a cell’s text matched a PHP function name. (#20962)
  • Fixed a bug where the “Use shapes to represent statuses” preference had no effect. (#20963)
  • Volumes now have an “Asset Transformer” setting, which chooses a transformer and accepts an environment variable. Volumes without one use the assets config setting’s defaultTransformer, and otherwise craft. Changing a volume’s setting clears its transform index. (#20906)
  • CraftCms\Cms\Config\AssetsConfig now has defaultTransformer(), addTransformer(), and transformers(). They set the default transformer, the craft transformer’s outputDisk and generateTransformsBeforePageLoad, and other named transformers, each with a driver and that driver’s settings. Two transformers can use the same driver with different settings. (#20906)
  • Disks’ asset_transformer key in config/filesystems.php is deprecated. Craft still reads it, after a volume’s Asset Transformer setting and before the assets config setting’s defaultTransformer, and logs a deprecation warning. Its has_urls setting still applies, and still defaults to false when output_disk names a disk other than the volume’s. The craft transformer’s output disk and generate_transforms_before_page_load settings are now set with the assets config setting. (#20906)
  • The craft asset transformer no longer has a has_urls setting, except through a disk’s deprecated asset_transformer key. Transforms have public URLs when their volume does, built by the disk they’re stored on. (#20906)
  • The Yii2 Loose Ends utility now lists volumes that stored transforms on a separate Craft 5 transform filesystem. (#20906)
  • CraftCms\Cms\Asset\AssetTransformers now extends Illuminate\Support\MultipleInstanceManager. Its extend() callbacks now receive the config of the transformer being built, including its driver key, as a second argument, and craft is a reserved driver name. (#20906)
  • Added CraftCms\Cms\Asset\AssetTransformers::forVolume(), transformer(), and forgetTransformers(). (#20906)
  • Added CraftCms\Cms\Asset\Data\AssetTransformer::$name, which is the transformer’s name. $driver and $settings are deprecated, and $settings is always empty. Named image transforms’ custom parameters are now keyed by transformer name. (#20906)
  • CraftCms\Cms\Image\ImageTransformer::getTransformUrl() and deleteImageTransformFile() now take a CraftCms\Cms\Image\CraftAssetTransformDriver instead of a CraftCms\Cms\Asset\Data\AssetTransformer, so transforms are stored on the output disk of the craft transformer that runs, including when another driver hands a transform to it. (#20906)
  • Deprecated CraftCms\Cms\Asset\AssetTransformers::driver() and forgetDrivers(). transformer() and forgetTransformers() should be used instead. (#20906)
  • Removed CraftCms\Cms\Asset\AssetTransformers::forDisk() and configForDisk(). (#20906)
  • Fixed a bug where aborting an update after a failed database backup left the system in maintenance mode. (#20547)
  • Fixed an error that occurred when resolving users for a GraphQL schema without any user groups. (#21004)
  • Fixed an error that occurred when project config changes were saved, and on control panel pages for admins, if the project config folder couldn’t be written. The changes are still saved, and admins now see the “folder isn’t writable” alert. (#20547)
  • Fixed an error that occurred when saving an entry with an empty required Color or Link field. (#20935)
  • Fixed a bug where the auth middleware redirected front-end guests to the primary site’s login path rather than the current site’s. (#21007)
  • Fixed a bug where updating a field layout with the MCP tools could orphan custom fields’ content. (#21006)
  • Fixed a bug where existing entries weren’t updated when a section’s sites or propagation method were changed through project config while using the sync queue connection. (#21005)
  • Fixed a bug where element indexes didn’t remember the chosen number of elements per page. (#20979)
  • Fixed a bug where tabs had inconsistent heights and spacing across control panel screens. (commerce#4454)
  • Fixed a bug where routes defined in Settings → Routes, plugins’ routes/web.php files, and other routes in the craft middleware group returned a 404 error on sites whose base URL has a path. (#20988, #21015)
  • Fixed a bug where editing an element activity comment replaced its whole timeline item. Comments are now edited in place, with pill-shaped Cancel and Save buttons, and comment fields use the standard focus ring. (#20955)
  • Fixed a bug where sites weren’t detected when Craft is installed in a folder and their base URLs are inside it, such as https://example.com/craft/fr/. (#20988, #21015)
  • Fixed a bug where site-specific routes in Settings → Routes only worked on the primary site. (#21015)
  • Fixed a bug where sites weren’t detected when their base URLs contained percent-encoded characters. (#21015)
  • Fixed a bug where some validation errors, such as Time fields’ minimum and maximum time errors, and Color, “Entry URI Format”, and 4-byte character errors, showed “{attribute}” rather than the field’s name. (#20935)
  • Fixed a bug where validation errors showed asterisks around field names, such as “The *Title* field is required.” (#20935)
  • Fixed a bug where plugins’ front-end routes returned a 404 error under Laravel Octane with the Yii adapter installed. (#21019)
  • Fixed a bug where CRAFT_SITE and CRAFT_SITE_UPPER kept the previous site request’s values under Laravel Octane. (#20998, #21022)
  • Fixed a bug where the GraphQL API’s OAuth discovery metadata had the wrong URLs in headless mode and on control panel requests. (#21029)
  • Fixed a bug where relation field cards didn’t show their elements’ statuses. (#21028, #21046)
  • Deprecated the $site argument of CraftCms\Cms\Site\Sites::getRequestPath(). (#20988, #21015)
  • Removed CraftCms\Cms\Route\Routes::siteBasePaths(). (#21015)
  • Added CraftCms\Cms\Element\Drafts::saveDraftForApplying(). (#21053)
  • Fixed a bug where entries created by applying an unpublished draft via MCP didn’t get a post date. (#21041, #21053)
  • Fixed a bug where the drafts_apply MCP tool returned “Draft not found.” when the user wasn’t permitted to apply the draft. (#21043, #21053)
  • Fixed a bug where the drafts_apply MCP tool didn’t validate drafts before applying them. (#21053)
  • Fixed a bug where comboboxes limited to their options couldn’t be cleared by deleting their text. (#21057)
  • Fixed a bug where Link fields’ Entry settings listed two “All” sources. (#21059)
  • Fixed a bug where checking “All” in Link fields’ element sources and Markdown fields’ “Available Volumes” settings didn’t check the other options. (#21059)
  • Fixed a bug where option and Color field values didn’t show their colors in element indexes and cards. (#21055, #21070)
  • Fixed a bug where generated fields couldn’t be shown as element index columns. (#21079, #21087)
  • Fixed a bug where eager-loading maps that covered more than one element type, or were returned as a list of maps, only loaded the elements from one of them.
  • Fixed a bug where Range fields were drawn as a text input with no slider track, and didn’t show their number input or suffix. (#21056, #21072)
  • Fixed a bug where Markdown field layout UI elements weren’t displayed in a pane when “Display content in a pane” was enabled, and their lists had no bullets or numbers. (#21061, #21074)
  • Fixed a bug where paragraphs and lists in callouts and Markdown UI elements had no space between them. (#21074)
  • Fixed a bug where element index columns for fields within Content Block fields were empty, and inline edits to them weren’t saved. (#21090, #21115)
  • Fixed a bug where Table fields’ Number columns could save 0, or drop the minus sign, for numbers written with the formatting locale’s own digits or minus sign, such as Arabic digits or Swedish negative numbers. (#21110)
  • Fixed a bug where typing a character that a number input doesn’t allow could move the cursor to the wrong place. (#21110)
  • Fixed a bug where element queries’ limit(), offset(), orderBy(), latest(), oldest(), and other chainable methods were documented as returning the class that declares them, so PHPStan treated EntryQuery and other element queries as a plain ElementQuery after calling them. (#21134)
  • Fixed a bug where the @formatDateTime GraphQL directive ignored its timezone argument for PHP date formats, including the default format. (#21133)
  • Fixed a bug where the custom field IDE helper was only regenerated after the first content model change in a request or command, so it missed the rest, such as other entry types added by the same project config apply. (#21137)
  • Fixed a bug where control panel links lost their #fragment when the URL had more than one query parameter. (#21093, #21140)
  • Fixed a bug where element actions and exports on the Assets index ignored the subfolder being viewed and “Search in subfolders”. (#21146, #21148)
  • Fixed a bug where or conditions passed to element queries’ legacy andWhere() method could match elements that the query’s other params excluded. (#21147, #21149)
  • Fixed errors that occurred when calling element queries’ legacy filterWhere(), andFilterWhere(), and orFilterWhere() methods. (#21147, #21149)
  • Fixed a bug where batched queue jobs could keep spawning empty batches when their query returned fewer items than it counted. (#21173)
  • Fixed a bug where required Dropdown fields without a default option showed their first option when empty, but saved no value. (#21152, #21154)
  • Fixed a bug where switching tabs in a slideout could switch the visible panel of another slideout behind it. (#21153, #21179)
  • Fixed a bug where labels in field layout designers’ Appearance settings and Generated Fields tables could point to the inputs of another field layout designer in a stacked slideout. (#21153, #21186)
  • Fixed a bug where PHPStan reported generics.interfaceConflict errors for element classes with an @extends tag, such as Eloquent elements, because ElementInterface and Component disagreed on the type of their array-access keys. (#21135)
  • Fixed 32 more bugs. See the full release notes.
  • Fixed a high-severity RCE vulnerability. (GHSA-9p3q-pccj-957r)
  • Fixed a high-severity SQL injection vulnerability. (GHSA-7xq7-8wfg-687g)
  • Fixed moderate-severity authorization bypass vulnerabilities. (GHSA-8gcv-rgxx-7mqp, GHSA-37m7-32hj-46r3, GHSA-mgxq-8fxf-37q8)
  • Fixed a moderate-severity permission escalation vulnerability. (GHSA-96wg-7qqw-9946)
  • Fixed a low-severity vulnerability where sandboxed templates could replace the content of Twig\Markup and Illuminate\Support\HtmlString objects. (#21081, #21082)
  • Fixed a low-severity authorization bypass vulnerability.
  • Deprecated CraftCms\Cms\Ui\Controls\Link::registeredTypes(). Links whose type isn’t available are now always kept as they are. (#21097)