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
pathrepository. (#21241) {% expires %}and Craft’s no-cache headers no longer send the legacyExpiresandPragmaheaders. (#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: noneheader 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
filenameparam when saving an asset.newFilenameshould be used instead. - Assets can now only be saved with a new location in another volume, such as via
newLocationonelements/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, orcanonicalId. - 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
orderByvalues made of column names with an optionalascordesc. - Added the
element_sources_getandelement_sources_saveMCP tools, for reading and saving element index sidebars. (#21112) - Added the
condition_schemaMCP 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 shapeconfiguration_getreturns 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_viewandassets_download_urlMCP tools, which return scaled images of assets and single-use download URLs. (#21252) - Added the
serverInstructionsMCP 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
deletevalue, and rejectsortOrdervalues that leave out existing entries, including within nested Matrix fields. (#21176, #21271) - The
elements_createandelements_updateMCP tools now return the nested entries of the Matrix fields they saved. (#21176, #21271) - Added the
nested_entries_moveMCP 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_deleteandelements_deleteMCP tools now return the control panel’s deletion blockers, and require anacknowledgementbefore deleting. (#21230) - Added the
transferContentToandreplaceRelationsWitharguments to theelements_deleteMCP tool. (#21230) - The
configuration_*MCP tools now accept ascopeargument. (#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
outputargument to the@formatDateTimeGraphQL directive. It can be set todateortimeto output only the date or time, using the locale’s date or time format forshort,medium,long, andfull. (#21084) - Added the
assertCpMessage(),assertNoCpMessages(), andcpMessages()Illuminate\Testing\TestResponsemacros, for testing the control panel messages a response delivers. (#21161) Garnish.scrollContainer(from@craftcms/garnish) and the Yii2 adapter’sGarnish.$scrollContainerare now the content pane, rather than the window, from thelgbreakpoint up. (#21226)- Added
CraftCms\Cms\Http\ViewModels\Attributes\UnaffectedByFilters. (#21170) - Added
CraftCms\Cms\Element\Queries\ElementQuery::nextColumnDate()andnextStatusChangeDate(). - Added the
$withStatusChangesargument toCraftCms\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::$cacheDurationleaves 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\BatchedJobsubclasses can now process items from any data source by overridingloadData(). (#21164)- Added
CraftCms\Cms\Queue\ArrayBatcher. (#21164) - Added
CraftCms\Cms\Queue\BatchedJob::data()andloadData(). (#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\Batchableshould be used instead. (#21164) - Added
CraftCms\Cms\DeletionBlocker\BlockerRegistryandSubjectTypeRegistry. (#21104, #21141) - Added
CraftCms\Cms\DeletionBlocker\BaseResolvableDeletionBlockerandCraftCms\Cms\DeletionBlocker\Contracts\ResolvableDeletionBlockerInterface. (#21104, #21141) - Added
CraftCms\Cms\DeletionBlocker\ConditionReferencesBlocker,EntryTypeUsageBlocker,FieldUsageBlocker,SiteSectionsBlocker,SourceUsageBlocker,TrashedElementsBlocker,UserGroupUsageBlocker, andUserPhotoVolumeBlocker. (#21104, #21141, #21229) - Added
CraftCms\Cms\Field\Fields::countElementsWithValues(). (#21104, #21141) - Added
CraftCms\Cms\Ui\Nodes\Table::deletionBlockers(). (#21104, #21141) - Added the
deletionBlockersoption to@craftcms/uiHTTP actions. (#21104, #21141) - Added
Craft.DeletionBlockersModal. (#21104, #21141) Craft.ElementDeletionManagernow extendsCraft.DeletionBlockersModal. (#21104, #21141)Craft.EntryMovernow accepts asettingsargument, and itselementIndexargument can benull. (#21104, #21141)- Added
CraftCms\Cms\Mcp\Configuration\ConfigurationTypeInterfaceandConfigurationTypeRegistry, for adding configuration types to theconfiguration_*MCP tools. (#21228) CraftCms\Cms\Mcp\Elements\BaseElementAdapternow handles drafts for element types that support them. (#21228)- Added
CraftCms\Cms\Config\McpConfig::$serverInstructionsandserverInstructions(). (#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 theallowedFileExtensionsconfig setting.craft\elements\GlobalSet::canSave()now returnsfalsefor 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$replaceargument ofResponseHeaders::setCache(). (#20953) - Volumes’
fssetting has been renamed todisk, in project config, thevolumestable, and the volume MCP tools. Existing project config is updated automatically, and project config that still usesfscan still be applied. (#20959) - Deprecated
CraftCms\Cms\Asset\Data\Volume::$fsHandle,getFsHandle(),setFsHandle(), andgetResolvedFsTarget().$disk,getDisk(),setDisk(), andgetResolvedDisk()should be used instead. (#20959) - Deprecated the
fsHandleparameter of the volume MCP tools.diskshould be used instead. (#20959) - Added
CraftCms\Cms\Asset\Events\TransformGenerated. (#21050) - Deprecated
CraftCms\Cms\Asset\Events\AfterGenerateTransform.TransformGeneratedshould be used instead. (#21050) - Deprecated setting general config settings with
CRAFT_environment variables. They should be set inconfig/craft/general.phpinstead, withenv(). (#21018) - Added the
gqlconfig setting, which holds the GraphQL API’s settings as aCraftCms\Cms\Config\GqlConfigobject, and replaces theenableGql,enableGraphqlIntrospection,enableGraphqlCaching,setGraphqlDatesToSystemTimeZone,gqlTypePrefix,prefixGqlRootTypes,lazyGqlTypes,maxGraphqlBatchSize,maxGraphqlComplexity,maxGraphqlDepth, andmaxGraphqlResultsconfig settings. They’re nowgql.enabled,gql.enableIntrospection,gql.enableCaching,gql.setDatesToSystemTimeZone,gql.typePrefix,gql.prefixRootTypes,gql.lazyTypes,gql.maxBatchSize,gql.maxComplexity,gql.maxDepth, andgql.maxResults, and can be set withCRAFT_GQLorCRAFT_GQL_{SETTING}environment variables, such asCRAFT_GQL_MAX_DEPTH. The old settings and their environment variables still work, and log a deprecation warning. (#20930) - Added the
images,backups, andqueueconfig settings, which hold image, database backup, and queue settings asCraftCms\Cms\Config\ImagesConfig,BackupsConfig, andQueueConfigobjects. 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, andbrokenImagePath, which are nowimages.driver,images.defaultQuality,images.editorRatios,images.optimizeFilesize,images.preserveCmykColorspace,images.preserveExifData,images.preserveColorProfiles,images.rotateOnUploadByExifData,images.transformGifs,images.transformSvgs,images.upscale, andimages.brokenPath.backupOnUpdate,backupCommand,backupCommandFormat,restoreCommand, andmaxBackups, which are nowbackups.onUpdate,backups.command,backups.commandFormat,backups.restoreCommand, andbackups.max.runQueueAutomatically,queueName,lowPriorityQueueName, andtrackedQueueNames, which are nowqueue.runAutomatically,queue.name,queue.lowPriorityName, andqueue.trackedNames.
- Added the
assetsconfig setting, which holds asset settings as aCraftCms\Cms\Config\AssetsConfigobject. It replaces theallowedFileExtensions,extraAllowedFileExtensions,extraFileKinds,convertFilenamesToAscii,filenameWordSeparator,revAssetUrls,sanitizeSvgUploads,sanitizeCpImageUploads,trashedAssetDisk,tempAssetUploadDisk,uploadSessionDisk,uploader,uploadChunkSize,uploadSessionDuration, andmaxUploadFileSizeconfig settings, which are nowassets.revUrlsforrevAssetUrls,assets.trashDiskfortrashedAssetDisk,assets.tempUploadDiskfortempAssetUploadDisk, andassets.{setting}for the rest. The old settings and their environment variables still work, and log a deprecation warning. (#20930) - Added the
templatesandslugsconfig settings, which hold template and slug settings asCraftCms\Cms\Config\TemplatesConfigandSlugsConfigobjects. They replace these config settings, which still work and log a deprecation warning. (#20930)defaultTemplateExtensions,indexTemplateFilenames,partialTemplatesPath,privateTemplateTrigger,enableTemplateCaching, andcompiledTemplatesPath, which are nowtemplates.defaultExtensions,templates.indexFilenames,templates.partialsPath,templates.privateTrigger,templates.enableCaching, andtemplates.compiledPath.allowUppercaseInSlug,limitAutoSlugsToAscii,slugWordSeparator, andmaxSlugIncrement, which are nowslugs.allowUppercase,slugs.limitAutoToAscii,slugs.wordSeparator, andslugs.maxIncrement.
- Added the
routing,security,users, andgarbageCollectionconfig settings, which hold routing, security, user, and garbage collection settings asCraftCms\Cms\Config\RoutingConfig,SecurityConfig,UsersConfig, andGarbageCollectionConfigobjects. 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, andverifyEmailSuccessPath, which are nowrouting.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, androuting.verifyEmailSuccessPath.authGuard,authPasswordBroker,cooldownDuration,defaultRateLimit,defaultRateLimitDuration,defaultTokenDuration,disable2fa,invalidLoginWindowDuration,maxInvalidLogins,preventUserEnumeration,previewTokenDuration,rememberUsernameDuration, andstoreUserIps, which are nowsecurity.authGuard,security.authPasswordBroker,security.cooldownDuration,security.defaultRateLimit,security.defaultRateLimitDuration,security.defaultTokenDuration,security.disable2fa,security.invalidLoginWindowDuration,security.maxInvalidLogins,security.preventUserEnumeration,security.previewTokenDuration,security.rememberUsernameDuration, andsecurity.storeUserIps.autoLoginAfterAccountActivation,deferPublicRegistrationPassword,extraLastNamePrefixes,extraNameSalutations,extraNameSuffixes,oauthProviders,showFirstAndLastNameFields, anduseEmailAsUsername, which are nowusers.autoLoginAfterAccountActivation,users.deferPublicRegistrationPassword,users.extraLastNamePrefixes,users.extraNameSalutations,users.extraNameSuffixes,users.oauthProviders,users.showFirstAndLastNameFields, andusers.useEmailAsUsername.activityRetentionDuration,purgePendingUsersDuration,purgeUnsavedDraftsDuration, andsoftDeleteDuration, which are nowgarbageCollection.activityRetentionDuration,garbageCollection.purgePendingUsersDuration,garbageCollection.purgeUnsavedDraftsDuration, andgarbageCollection.softDeleteDuration.
- Added the
cpconfig setting, which holds control panel settings as aCraftCms\Cms\Config\CpConfigobject. It replaces theaccessibilityDefaults,cpHeadTags,cpIconPath,cpLogoPath,defaultCpLanguage,defaultCpLocale,disabledUtilities, andsystemTemplateCssconfig settings, which are nowcp.accessibilityDefaults,cp.headTags,cp.iconPath,cp.logoPath,cp.defaultLanguage,cp.defaultLocale,cp.disabledUtilities, andcp.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(), andgetPageTriggerParam(). The same methods onCraftCms\Cms\Config\SecurityConfigandRoutingConfigshould be used instead. (#20930) - Deprecated
CraftCms\Cms\Config\GeneralConfig::getTempAssetUploadDisk(),getUploadSessionDisk(), andgetTrashedAssetDisk().CraftCms\Cms\Config\AssetsConfig::getTempUploadDisk(),getUploadSessionDisk(), andgetTrashDisk()should be used instead. (#20930) - Deprecated
CraftCms\Cms\Config\GeneralConfig::getBackupOnUpdate()and theIMAGE_DRIVER_*constants.CraftCms\Cms\Config\BackupsConfig::shouldBackUpOnUpdate()andCraftCms\Cms\Config\ImagesConfig::DRIVER_*should be used instead. (#20930) - Config settings that hold config objects, such as
mcpandanchors, 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 asCRAFT_MCP. A config object only applies the settings it changes from their defaults. (#20930) - Removed the
maxCachedCloudImageSizeconfig setting and asset indexing’s “Cache remote images” option, including the--cacheRemoteImagesCLI 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
craftasset 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
vquery param. (#20957) - Improved the performance of field layout designers. (#21062)
- Form fields’ inner shadows are now shallower. (#21086)
- Added the
storage-keyattribute tocraft-dialogandcraft-resize-grips, and thestorageKeyprop toModalForm. (#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()andhasPendingInvalidations(). (#21058) - Added
CraftCms\Cms\Cp\Alerts::areCached(). (#21108) - Control panel alerts can now have
title,actions, andrefreshablekeys, which are shown in the alert’s heading and buttons. Plugins can pass them fromCpAlertsResolvingto 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.$elementDetailsPanelscan now have ascrollsItselfkey, 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/runrequest 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
spacelessfilter. (#21117) CraftCms\Cms\Element\Queries\AssetQuerynow has a template type for the asset class it returns, likeEntryQuery, 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 ofCraftCms\Cms\Element\ElementCollection’s two template types, and thephpType()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::$pathand the legacycraft\imagetransforms\ImageTransformer::EVENT_DELETE_TRANSFORMED_IMAGEevent’s path used backslashes on Windows. (#21048) - Fixed a bug where
CraftCms\Cms\Asset\Events\FolderCreating,FolderCreated,FolderRenaming,FolderRenamed, andFoldersDeletedwere never dispatched. (#21050) - Fixed a bug where
CraftCms\Cms\Asset\Events\TransformGeneratingandAfterGenerateTransform, and the legacycraft\elements\Asset::EVENT_BEFORE_GENERATE_TRANSFORMandEVENT_AFTER_GENERATE_TRANSFORMevents, 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\Assetafter callingsetTransform(). (#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:createcould create users with a username or email that was already taken. (#21040, #21052) - Craft no longer changes its behavior based on the
CRAFT_EPHEMERALenvironment 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()andcraft\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
@webalias, 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()andCraftCms\Cms\Ui\Controls\Textarea::showCharsLeft(). (#21066, #21076) - Added the
show-chars-leftattribute tocraft-inputandcraft-textarea. (#21066, #21076) - Added
CraftCms\Cms\Element\Eloquent\EloquentElement::gqlScope()andgqlTypeName(). (#21014) - Added
CraftCms\Cms\ProjectConfig\Exceptions\ProjectConfigWriteException, whichCraftCms\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, andurls(), andCraftCms\Cms\Image\ImageTransformer::getTransformFolderUrl(). (#21048) - Added
CraftCms\Cms\Asset\Events\FolderRenamed::$oldPath,$oldSubfolderPaths, andprefixes(), andCraftCms\Cms\Element\Events\ElementSlugAndUriUpdated::$oldUriandurls(). (#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, andCraftCms\Cms\Support\Str::stripEmphasis(). (#20935) - URLs generated with
route()andaction()for routes in thecraftmiddleware group now use the current site’s base URL, and asiteparameter generates them for another site. (#20988, #21015) - Added the
rootOnly()route macro, for routes in thecraftmiddleware 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()andCraftCms\Cms\Ui\Controls\Text::prefix(). (#21063) - Asset selector modals’ index adapters now have
refresh()andselectElements()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
assetsconfig setting’sdefaultTransformer, and otherwisecraft. Changing a volume’s setting clears its transform index. (#20906) CraftCms\Cms\Config\AssetsConfignow hasdefaultTransformer(),addTransformer(), andtransformers(). They set the default transformer, thecrafttransformer’soutputDiskandgenerateTransformsBeforePageLoad, and other named transformers, each with adriverand that driver’s settings. Two transformers can use the same driver with different settings. (#20906)- Disks’
asset_transformerkey inconfig/filesystems.phpis deprecated. Craft still reads it, after a volume’s Asset Transformer setting and before theassetsconfig setting’sdefaultTransformer, and logs a deprecation warning. Itshas_urlssetting still applies, and still defaults tofalsewhenoutput_disknames a disk other than the volume’s. Thecrafttransformer’s output disk andgenerate_transforms_before_page_loadsettings are now set with theassetsconfig setting. (#20906) - The
craftasset transformer no longer has ahas_urlssetting, except through a disk’s deprecatedasset_transformerkey. 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\AssetTransformersnow extendsIlluminate\Support\MultipleInstanceManager. Itsextend()callbacks now receive the config of the transformer being built, including itsdriverkey, as a second argument, andcraftis a reserved driver name. (#20906)- Added
CraftCms\Cms\Asset\AssetTransformers::forVolume(),transformer(), andforgetTransformers(). (#20906) - Added
CraftCms\Cms\Asset\Data\AssetTransformer::$name, which is the transformer’s name.$driverand$settingsare deprecated, and$settingsis always empty. Named image transforms’ custom parameters are now keyed by transformer name. (#20906) CraftCms\Cms\Image\ImageTransformer::getTransformUrl()anddeleteImageTransformFile()now take aCraftCms\Cms\Image\CraftAssetTransformDriverinstead of aCraftCms\Cms\Asset\Data\AssetTransformer, so transforms are stored on the output disk of thecrafttransformer that runs, including when another driver hands a transform to it. (#20906)- Deprecated
CraftCms\Cms\Asset\AssetTransformers::driver()andforgetDrivers().transformer()andforgetTransformers()should be used instead. (#20906) - Removed
CraftCms\Cms\Asset\AssetTransformers::forDisk()andconfigForDisk(). (#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
authmiddleware 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
syncqueue 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.phpfiles, and other routes in thecraftmiddleware 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_SITEandCRAFT_SITE_UPPERkept 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
$siteargument ofCraftCms\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_applyMCP tool returned “Draft not found.” when the user wasn’t permitted to apply the draft. (#21043, #21053) - Fixed a bug where the
drafts_applyMCP 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 treatedEntryQueryand other element queries as a plainElementQueryafter calling them. (#21134) - Fixed a bug where the
@formatDateTimeGraphQL directive ignored itstimezoneargument 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
#fragmentwhen 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
orconditions passed to element queries’ legacyandWhere()method could match elements that the query’s other params excluded. (#21147, #21149) - Fixed errors that occurred when calling element queries’ legacy
filterWhere(),andFilterWhere(), andorFilterWhere()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.interfaceConflicterrors for element classes with an@extendstag, such as Eloquent elements, becauseElementInterfaceandComponentdisagreed 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\MarkupandIlluminate\Support\HtmlStringobjects. (#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)