# Release Notes for Craft CMS 3.x ## Unreleased ### Added - The control panel is now translated into Ukranian. - Added `craft\helpers\Template::resolveTemplatePathAndLine()`. ### Changed - Deprecation warnings’ stack traces now show source templates’ paths and line numbers. - Matrix block previews now show selected option labels rather than their raw values. ([#11659](https://github.com/craftcms/cms/issues/11659)) - Exception JSON responses now include the previous exception details, recursively. ([#11694](https://github.com/craftcms/cms/discussions/11694)) ### Fixed - Fixed a bug where deprecation warnings for treating an element query as an array weren’t getting logged with an origin, if they involved Twig’s `|batch` filter. ([#11597](https://github.com/craftcms/cms/issues/11597)) - Fixed a bug where `{% js %}`, `{% script %}`, and `{% css %}` tags weren’t registering JavaScript and CSS code properly when used within a `{% cache %}` tag that contained an ungenerated image transform. ([#11602](https://github.com/craftcms/cms/issues/11602)) - Fixed a bug where the “User saved” notification was translated for the former language, when changing the current user’s language preference. - Fixed a JavaScript error that occurred when removing a category from a Categories field, if any of its descendants were selected as well. ([#11641](https://github.com/craftcms/cms/issues/11641)) - Fixed a bug where links to config settings from **Settings** → **General** didn’t include the correct setting anchors. ([#11665](https://github.com/craftcms/cms/pull/11665)) - Fixed styling issues with Live Preview in Firefox. ### Security - Fixed an information disclosure vulnerability. ## 3.7.48 - 2022-07-12 ### Changed - Relation fields now focus on the next related element’s “Remove” button when an element is removed. ([#11577](https://github.com/craftcms/cms/issues/11577)) ### Fixed - Fixed a bug where Craft’s Composer commands could produce a malformed `composer.json` file. ([#11564](https://github.com/craftcms/cms/issues/11564)) - Fixed a bug where date range inputs weren’t working on mobile. ([#11571](https://github.com/craftcms/cms/issues/11571)) - Fixed a bug where the “Craft Support” Dashboard widget wasn’t being labeled properly in the widget settings HUD and delete confirmation dialog. ([#11573](https://github.com/craftcms/cms/discussions/11573)) - Fixed a bug where treating element queries as arrays wasn’t always logging deprecation warnings. - Fixed a bug where the project config cache was getting invalidated on each public GraphQL API request. - Fixed a bug where the “Status” label on Edit User pages was blank for suspended users. - Fixed an error that could occur when an image transform was configured with a non-integer width or height. ([#11587](https://github.com/craftcms/cms/issues/11587)) ## 3.7.47.1 - 2022-07-06 ### Fixed - Fixed a bug where asset bundles weren’t getting registered on the front end. ([#11555](https://github.com/craftcms/cms/issues/11555)) ## 3.7.47 - 2022-07-05 ### Changed - Template caching is now supported for console requests, for `{% cache %}` tags that have the `globally` param. ([#11551](https://github.com/craftcms/cms/issues/11551)) - Updated Composer to 2.2.15. ([#11538](https://github.com/craftcms/cms/issues/11538)) ### Fixed - Fixed focus styling issues with the Edit Route modal. ## 3.7.46 - 2022-06-28 ### Added - Added `craft\fields\BaseOptionsField::encodeValue()`. ### Changed - `canonical` is now a reserved field handle. ([#11503](https://github.com/craftcms/cms/issues/11503)) - `craft\fields\BaseOptionsField::translatedOptions()` now has an `$encode` argument. ### Fixed - Fixed a bug where `Garnish.setFocusWithin()` wasn’t working if the first focusable element was a checkbox. ([#11498](https://github.com/craftcms/cms/discussions/11498)) - Fixed a bug where Matrix blocks could be saved in the wrong order. - Fixed a bug where Checkboxes, Dropdown, Multi-select, and Radio Buttons fields could lose their values if their option values were set to integers. ([#11461](https://github.com/craftcms/cms/issues/11461)) ## 3.7.45.2 - 2022-06-24 ### Fixed - Fixed a SQL error that could occur on MySQL 5. ([#11493](https://github.com/craftcms/cms/issues/11493)) - Fixed a bug where Craft’s Composer commands weren’t ensuring that `config.allow-plugins.yiisoft/yii2-composer` was `true` in `composer.json`. ([#11399](https://github.com/craftcms/cms/issues/11399)) ## 3.7.45.1 - 2022-06-21 ### Fixed - Fixed a bug where it wasn’t possible to rename assets. - Fixed a bug where a provisional draft could be created for an entry if its form was interacted with before the page had fully initialized. ([#11466](https://github.com/craftcms/cms/issues/11466)) - Fixed exact phrase searching on PostgreSQL. ([#11486](https://github.com/craftcms/cms/issues/11486)) ## 3.7.45 - 2022-06-21 ### Changed - Improved performance when working with temp asset folders. - Temp asset folders are no longer created until they’re actually needed. ([#11427](https://github.com/craftcms/cms/issues/11427)) - Element index queries are no longer cached if they contain a search term. - Search inputs within field layout designers now prevent the containing form from being submitted when the Return key is pressed. ([#11415](https://github.com/craftcms/cms/discussions/11415)) ### Fixed - Fixed a bug where element types’ `actions()` methods were getting called for all `element-indexes/*` action requests. - Fixed a bug where the `install` command would run non-interactively even if not all needed options were passed, resulting in an error after the database tables had been added. ([#11305](https://github.com/craftcms/cms/issues/11305)) - Fixed a viewport clipping bug on the control panel’s Login page. ([#11372](https://github.com/craftcms/cms/pull/11372)) - Fixed a bug where filtering an element query by a relational field using `:empty:`/`:notempty:` wasn’t factoring in the field’s “Which site should entries be related from?” setting properly. - Fixed a bug where filtering an element query by a relational field using `:empty:`/`:notempty:` wasn’t factoring in the source elements’ site IDs, for fields set to manage relations on a per-site basis. ([#11418](https://github.com/craftcms/cms/issues/11418)) - Fixed a bug where the Temporary Uploads asset source wasn’t including subfolders. - Fixed a bug where file upload progress bars weren’t always going away when an upload error occurred. - Fixed a bug where Pashto was not being treated as an RTL langauge. ([#11428](https://github.com/craftcms/cms/issues/11428)) - Fixed a bug where the `upscaleImages` config setting wasn’t being respected for transforms where only a single image dimension was specified. ([#11398](https://github.com/craftcms/cms/issues/11398)) - Fixed an error that could occur when executing a GraphQL query, if a section didn’t have any entry types. ([#11273](https://github.com/craftcms/cms/issues/11273)) - Fixed an error that could occur when changing the primary site on installs with a large number of users. ([#11459](https://github.com/craftcms/cms/issues/11459)) - Fixed a bug where Assets fields within Vizy fields weren’t getting relocated from the user’s temp uploads folder. ([#11462](https://github.com/craftcms/cms/issues/11462)) ### Security - Environment-aware control panel fields no longer suggest environment variables that begin with `HTTP_`. - The Sendmail mailer no longer validates if the Sendmail Command setting is set to an enivornment variable that begins with `HTTP_`. ## 3.7.44 - 2022-06-03 ### Changed - Read/write splitting is now disabled for all console requests. - The `db/restore` command now prompts to clear data caches after the import is complete. ([#11327](https://github.com/craftcms/cms/issues/11327)) - Entry queries no longer factor in seconds when looking for currently-live entries, without excluding entries that were published in the past minute. ([#5389](https://github.com/craftcms/cms/issues/5389)) ### Fixed - Fixed an error that could occur on PHP 8.1. ([#11345](https://github.com/craftcms/cms/pull/11345)) - Fixed a bug where project config paths that contained slashes weren’t getting handled properly. ([#10774](https://github.com/craftcms/cms/issues/10774)) - Fixed a bug where the Login page had a tab-focusable “Skip to content” button. ([#11375](https://github.com/craftcms/cms/issues/11375)) ## 3.7.43 - 2022-05-20 ### Changed - Reversed the order of Lightswitch fields’ “ON Label” and “OFF Label” settings. ([#11259](https://github.com/craftcms/cms/issues/11259)) - `craft\services\Elements::duplicateElement()` now has a `$trackDuplication` argument. - `craft\services\Matrix::duplicateBlocks()` now has a `$trackDuplications` argument. ### Fixed - Fixed a bug where editable tables’ delete buttons’ `aria-label` attributes weren’t getting updated when table rows were reordered or deleted. - Fixed a bug where editable tables’ delete buttons weren’t visually disabled when the minimum number of rows had been reached. - Fixed a bug where all eager-loaded `srcset`-style transform sizes were relative to the first eager-loaded transform, rather than the prior one. ([#11209](https://github.com/craftcms/cms/issues/11209)) - Fixed a bug where eager-loaded `srcset`-style transform sizes didn’t reference the prior eager-loaded transform’s `format`, `interlace`, `mode`, `position`, or `quality` settings. ([#11264](https://github.com/craftcms/cms/issues/11264)) - Fixed a bug where the web-based installation wizard wouldn’t show the database connection screen if a connection could be established but no database was selected. ([#11245](https://github.com/craftcms/cms/issues/11245)) - Fixed an error that could occur when applying a multi-site draft with relational fields. ([#11220](https://github.com/craftcms/cms/issues/11220)) - Fixed a bug where Matrix blocks could be deleted from newly-created multi-site entries, if the edit page was reloaded. ([#10906](https://github.com/craftcms/cms/issues/10906)) ## 3.7.42 - 2022-05-11 ### Added - Added `craft\events\LocateUploadedFilesEvent`. - Added `craft\fields\Assets::EVENT_LOCATE_UPLOADED_FILES`. ([#11123](https://github.com/craftcms/cms/discussions/11123)) ### Changed - Improved save performance for multi-site elements ([#11113](https://github.com/craftcms/cms/issues/11113)) - Built-in Composer actions now ensure that `composer.json` allows the `craftcms/plugin-installer` Composer plugin. ### Fixed - Fixed a bug where soft-deleted drafts’ search keywords weren’t getting re-indexed if they were restored. - Fixed an error that occurred when transforming an SVG image without specifying a width or height. ([#11122](https://github.com/craftcms/cms/issues/11122)) - Fixed an error that occurred when saving a Number field with a non-numeric value. ([#11164](https://github.com/craftcms/cms/issues/11164)) - Fixed a bug where it wasn’t possible to drag an item to the top in admin tables. ([#10781](https://github.com/craftcms/cms/issues/10781)) - Fixed a bug where entries within Structure sections weren’t expandable if their only descendants were unpublished drafts. - Fixed a bug where expanding a collapsed Structure section entry wouldn’t reveal its descendants, if the parent was a draft. ([#11186](https://github.com/craftcms/cms/issues/11186)) - Fixed a bug where element caches weren’t getting cleared for elements when they were propagated to a newly-created site. ## 3.7.41 - 2022-05-06 ### Changed - The Upgrade utility now lists any uninstalled and unknown plugins. ([#11101](https://github.com/craftcms/cms/discussions/11101)) ### Fixed - Fixed an error that occurred when attempting to delete a global set. ([#11100](https://github.com/craftcms/cms/issues/11100)) - Fixed an error that could occur when applying a draft. ([#11083](https://github.com/craftcms/cms/issues/11083)) - Fixed a bug where element queries weren’t returning any results if an element attribute table wasn’t joined in, and the element query was set to an abstract element class. ([#11105](https://github.com/craftcms/cms/issues/11105)) ## 3.7.40.1 - 2022-05-04 ### Fixed - Fixed a bug where empty fields could be marked as changed, even when no change was made to them. ([#11078](https://github.com/craftcms/cms/issues/11078)) ## 3.7.40 - 2022-05-03 > {warning} If you are currently running Craft 3.7.39, you will need to [perform this update with Composer](https://craftcms.com/knowledge-base/updating-from-craft-3-7-39). ### Added - Added the “Craft 4 Upgrade” utility. - Added `craft\helpers\Db::extractGlue()`. - Added `craft\helpers\Db::normalizeParam()`. - Added `craft\utilities\Upgrade`. - Added `craft\web\assets\upgrade\UpgradeAsset`. ### Changed - Improved database performance for concurrent requests. ([#10662](https://github.com/craftcms/cms/issues/10662)) - The Crop tool in the image editor no longer displays the (incorrect) crop dimensions. ([#11046](https://github.com/craftcms/cms/issues/11046)) - Asset queries’ `volume` params now support passing an array of `craft\base\VolumeInterface` objects. - Category queries’ `group` params now support passing an array of `craft\models\CategoryGroup` objects. - Entry queries’ `section` params now support passing an array of `craft\models\Section` objects. - Entry queries’ `type` params now support passing an array of `craft\models\EntryType` objects. ([#11057](https://github.com/craftcms/cms/issues/11057)) - Matrix block queries’ `field` params now support passing an array of `craft\fields\Matrix` objects. - Tag queries’ `group` params now support passing an array of `craft\models\TagGroup` objects. - Options passed to the `_includes/forms/select` control panel template can now specify a `hidden` key. ([#11053](https://github.com/craftcms/cms/pull/11053)) - `craft\services\Fields::getLayoutsByType()` now memoizes its results. ([#11037](https://github.com/craftcms/cms/pull/11037)) - Downgraded Composer to 2.2.12, fixing an error that occurred when updating Craft or installing/updating/uninstalling plugins. ### Removed - Removed the `--propagate` option from `resave/*` commands, which didn’t have any effect. ([#11032](https://github.com/craftcms/cms/discussions/11032)) ### Fixed - Fixed a bug where “Name” and “Handle” were not getting translated properly in field, volume, and global set validation errors. ([#11029](https://github.com/craftcms/cms/issues/11029)) - Fixed a bug where passing an array of `craft\models\UserGroup` objects to a user query’s `group` param had no effect. - Fixed a bug where passing an array that began with `not` into a user query’s `group` param wouldn’t return users that had no user groups. - Fixed a bug where it wasn’t possible to order elements by `rand()`/`random()` via GraphQL. ([#11063](https://github.com/craftcms/cms/issues/11063)) - Fixed a bug where empty Date and Number fields would be marked as changed, even when no change was made to them. ([#10804](https://github.com/craftcms/cms/issues/10804)) ## 3.7.39 - 2022-04-26 ### Added - The Caches utility now has a “Compiled classes” option. ([#10281](https://github.com/craftcms/cms/pull/10281)) - Added the `folderPath` asset query param. - Added `craft\services\Assets::getTempVolumeAndSubpath()`. - Added `craft\services\Assets::createTempAssetQuery()`. - Added `craft\services\Fields::updateColumn()`. - Added `craft\services\Sections::getEntryTypeByUid()`. ### Changed - Fields’ search indexes are now immediately removed when their “Use this field’s values as search keywords” settings are disabled. - User groups’ permission lists are now sorted alphabetically when saved to the project config. ([#10408](https://github.com/craftcms/cms/issues/10408)) - Improved dropdown menu styling for Firefox. - Improved GraphQL performance. - `{% nav %}` tags now skips elements whose immediate parent weren’t included in the output. ([#10925](https://github.com/craftcms/cms/issues/10925)) - Asset, entry, and category selection modals now clear the search results when a new element is created. ([#11015](https://github.com/craftcms/cms/issues/11015)) - Asset and entry selection modals now sort the elements by Date Created (descending) when a new element is created, to ensure it is immediately visible and selected. ### Fixed - Fixed a bug where Matrix blocks could lose their Date field values, if multiple Date fields had with the same handle across different block types. ([#10884](https://github.com/craftcms/cms/issues/10884)) - Fixed a bug where Matrix block menus were getting truncated if they were too large to fit within the content pane. ([#10883](https://github.com/craftcms/cms/issues/10883)) - Fixed a bug where Assets fields weren’t respecting their dynamic folder path settings for unpublished drafts, if the Temp Upload Location asset setting was set to a volume. ([#9619](https://github.com/craftcms/cms/issues/9619)) - Fixed an error that could occur when saving an Assets field for a draft. - Fixed a bug where element queries weren’t being limited to return elements of the configured type, if no element type-specific tables were joined in. - Fixed a bug where element thumbnails weren’t loading for all but the initial content tab. ([#10918](https://github.com/craftcms/cms/issues/10918)) - Fixed a bug where Matrix fields’ Min Blocks settings weren’t getting enforced for empty Matrix fields. - Fixed an error that could occur when saving Matrix fields with either Min Blocks or Max Blocks configured, but not both, if the Intl extension wasn’t installed. ([#10922](https://github.com/craftcms/cms/issues/10922)) - Fixed a bug where the system name container was taking up the full viewport height in Safari 13. ([#10930](https://github.com/craftcms/cms/issues/10930)) - Fixed a bug where Matrix sub-fields were losing their column suffixes after they were resaved. ([#10973](https://github.com/craftcms/cms/issues/10973)) - Fixed a bug where saving a Matrix field without any block types would result in no changes made to the previously-configured block types, rather than displaying a validation error. ([#10989](https://github.com/craftcms/cms/issues/10989)) ### Security - The `redirect` controller action now requires the passed-in `url` param to be hashed. ([#10994](https://github.com/craftcms/cms/issues/10994)) ## 3.7.38 - 2022-04-06 ### Added - Added `craft\helpers\ArrayHelper::onlyContains()`. - Added `craft\test\Craft::assertNotPushedToQueue()`. ([#10510](https://github.com/craftcms/cms/pull/10510)) ### Changed - Duplicated elements no longer have “copy” appended to the end of their titles. ([#10707](https://github.com/craftcms/cms/pull/10707)) - User queries’ `group` and `groupId` params now support passing an array that begins with `and`, to only return users that are in all of the subsequent user groups. - `Craft.BaseElementSelectorModal` now has `bodyAction` and `indexSettings` settings. ([#4348](https://github.com/craftcms/cms/pull/4348)) ### Fixed - Fixed a bug where color pickers weren’t clickbale within Table fields. ([#10775](https://github.com/craftcms/cms/issues/10775)) - Fixed a bug where multi-site elements weren’t getting all of their titles duplicated correctly. ([#10702](https://github.com/craftcms/cms/issues/10702)) - Fixed deprecation errors that occurred when validating relational and Matrix fields. ([#10815](https://github.com/craftcms/cms/issues/10815)) - Fixed an error that occurred if field instructions contained any unclosed HTML tags. ([#10290](https://github.com/craftcms/cms/issues/10290)) - Fixed a bug where the selected volume subfolder would get included in folder drag-and-drop operations. ([#10745](https://github.com/craftcms/cms/issues/10745)) - Fixed a bug where slideouts weren’t closing when clicked out of, after being opened for the second time. ([#10586](https://github.com/craftcms/cms/issues/10586)) - Fixed a bug where `Craft.appendHeadHtml()` wasn’t pruning out `` tags that were already present in the DOM. - Fixed a bug where image transforms weren’t always getting generated for disabled sites. ([#10498](https://github.com/craftcms/cms/issues/10498)) - Fixed a bug where it wasn’t possible to scroll the content pane horizontally if any fields took up more than 100% of its width. ([#10849](https://github.com/craftcms/cms/issues/10849)) ## 3.7.37 - 2022-03-16 ### Changed - Improved the styling of copy buttons in the control panel. ([#10732](https://github.com/craftcms/cms/discussions/10732)) - In-app Plugin Store purchases are now completed on `id.craftcms.com` rather than within the control panel. ### Fixed - Fixed a bug where two users could be created with the same username and email, if the **Save** button was double-clicked. ([#9835](https://github.com/craftcms/cms/issues/9835), [#10661](https://github.com/craftcms/cms/issues/10661)) - Fixed an error that could occur when updating from an earlier version than Craft 3.5.6. ([#10685](https://github.com/craftcms/cms/issues/10685)) - Fixed an error that could occur when rendering an exception view for another error. ([#10712](https://github.com/craftcms/cms/issues/10712)) - Fixed a bug where pressing Spacebar on copy buttons in admin tables didn’t activate them. - Fixed a style issue for Safari. ([#10748](https://github.com/craftcms/cms/pull/10748)) ## 3.7.36 - 2022-03-03 ### Changed - `{% js %}` and `{% css %}` tags can now import URLs that don’t end in `.js` or `.css`, so long as they begin with `https://` or `http://`. ([#10666](https://github.com/craftcms/cms/discussions/10666)) - The `plugin/list` command now shows plugins’ package names. ([#10667](https://github.com/craftcms/cms/discussions/10667)) ### Fixed - Fixed a bug that prevented moving assets between volumes. ([#10668](https://github.com/craftcms/cms/issues/10668)) ## 3.7.35 - 2022-03-01 ### Added - Added `craft\errors\BusyResourceException`. - Added `craft\errors\StaleResourceException`. ### Changed - Improved Live Preview accessibility. ([#7476](https://github.com/craftcms/cms/issues/7476)) - Improved error reporting when trying to upload an Asset from a disallowed location. ([#10633](https://github.com/craftcms/cms/issues/10633)) - The `resave/entries` command now supports a `--revisions` flag. ([#10634](https://github.com/craftcms/cms/issues/10634)) ### Fixed - Fixed an error that occurred when initializing an element with custom field values that weren’t included in its field layout. ([#10622](https://github.com/craftcms/cms/issues/10622)) - Fixed a PHP 8 compatibility bug. - Fixed a bug where drafts weren’t getting propagated when a section was enabled for new sites. ([#10634](https://github.com/craftcms/cms/issues/10634)) - Fixed a bug where moving files and folders from the Assets index page wouldn’t ever resolve properly if there was an unexpected server error. - Fixed a bug where disclosure menus could be shorter than their contents. ([#10639](https://github.com/craftcms/cms/issues/10639)) - Fixed potential race conditions that could result in old project config data getting cached. ([#7795](https://github.com/craftcms/cms/issues/7795)) - Fixed a bug where numerically-indexed array keys weren’t always consecutive after the project config was rebuilt. ([#10512](https://github.com/craftcms/cms/issues/10512)) ## 3.7.34 - 2022-02-22 ### Added - Added `craft\helpers\App::phpConfigValueAsPaths()`. - Added `craft\helpers\App::normalizePhpPaths()`. - Added `craft\helpers\App::isPathAllowed()`. ### Changed - Improved date and time input accessibility. ([#10575](https://github.com/craftcms/cms/pull/10575)) - Craft no longer attempts to write a license key file when `CRAFT_EPHEMERAL` is set to `true`. ([#10558](https://github.com/craftcms/cms/pull/10558)) - Craft no longer attempts to write project config YAML files when `CRAFT_EPHEMERAL` is set to `true`. ([#10558](https://github.com/craftcms/cms/pull/10558)) - Craft no longer publishes asset bundles when `CRAFT_EPHEMERAL` is set to `true`. ([#10558](https://github.com/craftcms/cms/pull/10558)) ### Fixed - Fixed a bug where Date fields weren’t displaying properly. - Fixed a bug where some GraphQL API query arguments would break element queries. ([#10580](https://github.com/craftcms/cms/issues/10580)) - Fixed a PHP 8.1 compatibility bug. ([#10594](https://github.com/craftcms/cms/issues/10594)) - Fixed a bug where Matrix action menus were causing horizontal scrollbars within Live Preview. ([#10601](https://github.com/craftcms/cms/issues/10601)) - Fixed a PHP warning that would occur when running Craft in Dev Mode, if the `open_basedir` PHP setting was set. ([#10581](https://github.com/craftcms/cms/issues/10581)) - Fixed a bug where the “View” button on Edit Category pages wasn’t getting linked to a tokenized preview page for disabled sites. - Fixed a bug where asset subfolder toggles weren’t visible when their source was focused. ([#10617](https://github.com/craftcms/cms/issues/10617)) - Fixed a bug where Live Preview would close when the Esc key was pressed, when a modal window was open. ([#10623](https://github.com/craftcms/cms/issues/10623)) ### Security - Craft now HTML-encodes user’ names in the default system email messages. ## 3.7.33 - 2022-02-15 [CRITICAL] > {tip} The way CSRF tokens are generated has changed in this release, so all users will be logged out during the update. ### Added - Added support for PHP 8.1. - Added the `users/logout-all` console command. - Added `Garnish.prefersReducedMotion()`. ### Changed - Lightswitch inputs are no longer animated for browsers that have requested reduced motion. ([#10532](https://github.com/craftcms/cms/pull/10532)) - Reverted the 3.7.32 change to plugin settings. ([#10533](https://github.com/craftcms/cms/issues/10533)) - Improved accessibility for the Craft Support widget. ([#7290](https://github.com/craftcms/cms/issues/7290)) - The `graphql/api` controller action now supports passing the GraphQL bearer token via an `X-Craft-Authorization` header, in addition to `Authorization`. ([#10539](https://github.com/craftcms/cms/discussions/10539)) - `craft\helpers\App::parseBooleanEnv()` now treats `0` and `1` as boolean values. ([#10524](https://github.com/craftcms/cms/issues/10524)) - Updated GraphiQL to 1.5.16. - Updated Yii to 2.0.45. - Updated svg-sanitizer to 0.15. ## Fixed - Fixed a bug where admin tables would display the wrong handle values after an item was deleted. ([#10538](https://github.com/craftcms/cms/issues/10538)) - Fixed a bug where entries and Matrix blocks weren’t necessarily getting propagated from the primary site, when they were activated for a new site via a setting change. ([#10561](https://github.com/craftcms/cms/issues/10561)) - Fixed an error that occurred when testing queue jobs. ([#10569](https://github.com/craftcms/cms/pull/10569)) ### Security - Fixed a potential CSRF security issue. ## 3.7.32 - 2022-02-09 ### Added - Added `craft\base\FieldInterface::getInputId()`. - Added `craft\db\Migration::createIndexIfMissing()`. - Added `craft\db\Migration::dropIndexIfExists()`. - Added `craft\services\Users::canSuspend()`. - Added `craft\validators\SiteIdValidator::$allowDisabled`. ### Changed - Improved element query performance. ([#10418](https://github.com/craftcms/cms/discussions/10418)) - Improved asset transform eager-loading performance. ([#10427](https://github.com/craftcms/cms/discussions/10427)) - The “Suspend” and “Unsuspend” user actions are now smarter about when they should be available, based on the selected users. - Plugin settings forms now display the values stored in the project config, even if they’ve been overridden by the plugin’s config file. - Improved the styling of field tips and warnings. - The Edit Field page will now instantiate a new field instance of the expected field type, if it had been previously saved while the field type was missing. ([#10437](https://github.com/craftcms/cms/issues/10437)) ### Fixed - Fixed a bug where Date and Time fields’ labels weren’t referencing the correct input IDs. - Fixed a bug where the last control panel breadcrumb could be collapsed under a “More…” menu when there was enough room to display it. ([#10495](https://github.com/craftcms/cms/issues/10495)) - Fixed a bug where it was possible for non-admins to suspend/unsuspend admins from the Users index page. ([#10422](https://github.com/craftcms/cms/issues/10422)) - Fixed a bug where the `project-config/apply` command output could get mangled. ([#9900](https://github.com/craftcms/cms/issues/9900)) - Fixed an error that could occur when saving an entry programmatically on a front-end request, if any sites were disabled. ([#10499](https://github.com/craftcms/cms/issues/10499)) - Fixed a bug where Date and Time inputs weren’t clearable on mobile. ([#10500](https://github.com/craftcms/cms/issues/10500)) - Fixed a bug where Date and Time fields created by JavaScript weren’t getting native `date` and `time` inputs on mobile. - Fixed a JavaScript error on the Edit User page. ([#10509](https://github.com/craftcms/cms/issues/10509)) - Fixed a bug where it was possible to save a custom field whose type was missing. ([#10437](https://github.com/craftcms/cms/issues/10437)) ### Security - Fixed a GraphQL API vulnerability. ## 3.7.31 - 2022-02-08 ### Added - Added the `clear-deprecations` command. ([#10430](https://github.com/craftcms/cms/discussions/10430)) - Added the `plugin/list` command. ([#10470](https://github.com/craftcms/cms/pull/10470)) - Added the `users/activation-url` and `users/password-reset-url` commands. ([#10482](https://github.com/craftcms/cms/pull/10482)) - Added the `revisionId` field to drafts when queried via GraphQL. ([#10462](https://github.com/craftcms/cms/pull/10462)) - Added `craft\web\View::registerJsWithVars()`. ### Changed - Improved focus styles in the control panel. ([#10398](https://github.com/craftcms/cms/pull/10398)) - Improved Matrix field accessibility for screen readers. ([#10480](https://github.com/craftcms/cms/pull/10480)) - Improved Table field accessibility for screen readers. ([#10502](https://github.com/craftcms/cms/pull/10502)) - Handles within admin tables are now displayed as copy-buttons. ([#10475](https://github.com/craftcms/cms/discussions/10475)) - Craft no longer sends a `Permissions-Policy: interest-cohort=()` header by default, as Google has [abandoned](https://blog.google/products/chrome/get-know-new-topics-api-privacy-sandbox/) its FLoC proposal. - Craft no longer attempts to create the `cpresources` folder when `CRAFT_EPHEMERAL` is set to `true`. ([#10412](https://github.com/craftcms/cms/issues/10412)) - Video assets’ focal points are no longer suppressed, if they were set by a plugin or module. ([#10415](https://github.com/craftcms/cms/discussions/10415)) - Plugins are now consistently loaded in the same order across all environments. ([#10441](https://github.com/craftcms/cms/issues/10441)) - Element exporters’ `export()` methods can now return an array or generator function, even if `isFormattable()` returns `true`. ([#10484](https://github.com/craftcms/cms/pull/10484)) - `Craft.BaseElementSelectorModal` now supports a `fullscreen` setting. ### Fixed - Fixed a bug where Craft would not display an appropriate error message if a Local volume was pointing to a broken symlink. ([#10396](https://github.com/craftcms/cms/issues/10396) - Fixed an error that could occur when calling an element’s `getUrl()` method for a disabled site. ([#10421](https://github.com/craftcms/cms/issues/10421)) - Fixed a JavaScript error that occurred after saving an unpublished draft. - Fixed a bug where Live Preview wasn’t always showing changes for entries that weren’t live. ([#10455](https://github.com/craftcms/cms/issues/10455)) - Fixed a bug where it wasn’t possible to restore a soft-deleted global set with project config. ([#10458](https://github.com/craftcms/cms/issues/10458)) - Fixed right-to-left layout styling bugs. ([#10459](https://github.com/craftcms/cms/issues/10459), [#10439](https://github.com/craftcms/cms/issues/10439)) - Fixed a bug where entry revision menus would show newly-added sites as enabled even if they were disabled by default. - Fixed a bug where `craft\base\Element::getCanonical()` wasn’t memoizing its result based on the `$anySite` argument. - Fixed a JavaScript error. ([#10428](https://github.com/craftcms/cms/issues/10428)) - Fixed a bug where Dashboard widget flip animations weren’t always working in Firefox. - Fixed an error that could occur if an element’s `getSupportedSites()` method returned info for a site that didn’t exist or was soft-deleted. - Fixed GraphiQL layout issues for users with a RTL language set. ([#10465](https://github.com/craftcms/cms/pull/10465)) ## 3.7.30.1 - 2022-01-21 ### Fixed - Fixed a bug where the “New category” button on the Categories index page wasn’t working. ([#10399](https://github.com/craftcms/cms/issues/10399)) - Fixed an error that occurred when saving an Assets field with a file that was in a temporary location within the `storage/` folder, if the `storage/` folder didn’t live within the project root. ([#10401](https://github.com/craftcms/cms/issues/10401)) ## 3.7.30 - 2022-01-20 > {warning} The `mutex` component now uses a file-based driver by default. Load-balanced environments should [switch to a different driver](https://craftcms.com/knowledge-base/configuring-load-balanced-environments#mutex-locks). ### Added - Added `craft\mutex\Mutex`. - Added `craft\mutex\MutexTrait`. - Added `craft\mutex\NullMutex`. ### Changed - When a draft is published, Craft now automatically reloads other browser tabs that are opened to the same Edit Entry page. ([#10381](https://github.com/craftcms/cms/issues/10381)) - Improved modal and slideout accessibility for screen readers. ([#10384](https://github.com/craftcms/cms/pull/10384), [#10234](https://github.com/craftcms/cms/pull/10234)) - The `mutex` component is now set to `craft\mutex\Mutex` by default, and should no longer be overridden directly. Its nested `mutex` property should be [overridden instead](https://craftcms.com/knowledge-base/configuring-load-balanced-environments#mutex-locks). - `craft\helpers\App::mutexConfig()` is no longer deprecated. ### Deprecated - Deprecated `craft\helpers\App::dbMutexConfig()`, as database-based mutex locking is no longer recommended. - Deprecated `craft\mutex\DbMutexTrait`. - Deprecated `craft\mutex\MysqlMutex`. - Deprecated `craft\mutex\PgsqlMutex`. ### Fixed - Fixed a bug where Craft could generate `CustomFieldBehavior` classes that were missing the available fields. ([#6013](https://github.com/craftcms/cms/issues/6013)) - Fixed a bug where Live Preview iframes weren’t full-height when `useIframeResizer` was disabled. ([#10380](https://github.com/craftcms/cms/issues/10380)) - Fixed an error that could occur if an Assets field was saved while set to a file stored in `storage/runtime/assets/tempuploads/`. ([#10382](https://github.com/craftcms/cms/issues/10382)) - Fixed a bug where it wasn’t possible to apply a numeric namespace to input names. ([#6656](https://github.com/craftcms/cms/pull/6656)) ## 3.7.29 - 2022-01-18 ### Added - `resave/*` commands now support bulk-setting an attribute/custom field value via new `--set`, `--to`, and `--if-empty` options. ([#10356](https://github.com/craftcms/cms/pull/10356)) - Added `craft\fieldlayoutelements\BaseField::statusId()`. - Added `craft\helpers\App::parseEnv()` and `parseBooleanEnv()`, replacing their `Craft` class counterparts. ([#10319](https://github.com/craftcms/cms/discussions/10319)) ### Changed - The Users index page now updates the URL based on the selected source. ([#10336](https://github.com/craftcms/cms/issues/10336)) - Live Preview no longer reloads the iframe when the device type is changed. ([#10353](https://github.com/craftcms/cms/discussions/10353)) - `admins`, `all`, and `new` are now reserved user group handles. - The content in the `resourcepaths` table is now excluded from database backups by default. - User caches are now invalidated after login attempts. ([#10313](https://github.com/craftcms/cms/discussions/10313)) - Assets fields’ “Upload files” buttons now have `aria-describedby` attributes when appropriate. - Color fields’ hex inputs now have `aria-label` attributes. - Field status messages are now included in their `aria-describedby` attributes. - User queries will no longer exclude suspended users when `status('pending')` is passed. ([#10361](https://github.com/craftcms/cms/issues/10361)) - Template autosuggest fields now include suggestions for templates in custom site template roots. ([#10372](https://github.com/craftcms/cms/discussions/10372)) ### Deprecated - Deprecated `Craft::parseEnv()`. `craft\helpers\App::parseEnv()` should be used instead. - Deprecated `Craft::parseBooleanEnv()`. `craft\helpers\App::parseBooleanEnv()` should be used instead. ### Fixed - Fixed a bug where admin tables were displaying titles incorrectly. - Fixed a bug where `aria-describedby` attributes were getting namespaced incorrectly when they referenced multiple IDs. - Fixed a bug where “View” links on Edit Entry pages weren’t getting updated when the entry’s preview target URLs changed. ([#10257](https://github.com/craftcms/cms/issues/10257)) - Fixed a bug where `craft\base\ApplicationTrait::getIsMultiSite()` would return `false` on the front end, if there was only one enabled site, but additional disabled sites. - Fixed a bug where `craft\base\Element::getSite()` would throw an exception on the front end, if the element belonged to a disabled site. - Fixed a bug where `craft\services\Sites::getEditableSiteIds()` would exclude disabled sites on the front end. - Fixed a bug where validation errors referenced by `aria-describedby` attributes weren’t getting read out by VoiceOver. ([#10355](https://github.com/craftcms/cms/pull/10355)) - Fixed a bug where element queries’ `withQueries` properties were ignored. ([#10359](https://github.com/craftcms/cms/pull/10359)) - Fixed a bug where fatal PHP errors were not logged to `stderr` when the `CRAFT_STREAM_LOG` PHP constant was set to `true`. ([#10366](https://github.com/craftcms/cms/pull/10366)) - Fixed a bug where Dropdown fields with invalid data would not always display a blank option. ([#10365](https://github.com/craftcms/cms/issues/10365)) ### Security - Fixed an XSS vulnerability. ## 3.7.28 - 2022-01-05 ### Changed - Updated Yii to 2.0.44. ### Fixed - Fixed a Composer error that could occur if `composer.craftcms.com` was missing an expected package/version, but Packagist knew about it. ([#10311](https://github.com/craftcms/cms/issues/10311)) - Fixed a PHP error that could occur when querying for Matrix blocks. ([#10315](https://github.com/craftcms/cms/issues/10315)) - Fixed a bug where Single sections’ drafts would get deleted when their section settings were updated. ([#10307](https://github.com/craftcms/cms/issues/10307)) - Fixed an error that could occur on the Dashboard if there were any Quick Post widgets that included a Title field. ([#10314](https://github.com/craftcms/cms/issues/10314)) ## 3.7.27.2 - 2022-01-06 ### Fixed - Fixed an error that could occur when updating to Craft 3.7.28/Yii 2.0.44 from the control panel. ## 3.7.27.1 - 2022-01-04 ### Fixed - Fixed a PHP error that would occur when creating a new user. ([#10308](https://github.com/craftcms/cms/issues/10308)) ## 3.7.27 - 2022-01-04 ### Added - Added the `setSchemaOnConnect` database connection setting. ([#10273](https://github.com/craftcms/cms/issues/10273)) - Added `craft\errors\InvalidHtmlTagException`. - Added `craft\helpers\Html::encodeInvalidTags()`. - Added `craft\models\FieldLayout::getCustomFieldElements()`. - Added `craft\services\Fields::getLayoutsByIds()`. - Added `craft\web\twig\variables\Image::getContents()`, `getDataUrl()`, `getMimeType()`, and `getPath()`. ([#10268](https://github.com/craftcms/cms/issues/10268)) ### Changed - Improved the performance of the control panel, for installs with a large number of entry types. - A warning is now logged when a password-reset email could not be sent, if `preventUserEnumeration` is enabled. - The `install/check`, `install/craft`, and `setup/db-creds` commands now explicitly check if Craft is installed in the default schema on Postgres. - The `setup/db-creds` command now uses existing environment variable values for its default prompt values, if available. - The `setup/db-creds` command no longer prompts for the database schema on Postgres, unless `setSchemaOnConnect` is enabled. Instead it will determine the appropriate schema to use based on `SHOW search_path`. ([#10273](https://github.com/craftcms/cms/issues/10273)) - The web-based installation wizard no longer shows a field for the database schema on Postgres. ([#10273](https://github.com/craftcms/cms/issues/10273)) - Dashboard widgets’ `data-colspan` attributes are now updated when their colspan changes. ([#10286](https://github.com/craftcms/cms/discussions/10286)) - `craft\base\ApplicationTrait::getIsInstalled()` will now explicitly check if Craft is installed in the default schema on Postgres, when `true` is passed. - `craft\helpers\Html::parseTag()` now throws an `InvalidHtmlTagException` exception when an invalid tag is encountered. (Catching `InvalidArgumentException`s will still work.) - `craft\services\Routes::getProjectConfigRoutes()` now returns a numerically-indexed array of URL rule arrays, with `pattern` keys that define the URI patterns. - `craft\services\Users::getUserPreferences()` and `getUserPreference()` no longer accept `null` passed to the first argument. ### Deprecated - Deprecated `craft\elements\User::mergePreferences()`. ### Fixed - Fixed a bug where the details pane could jump down when scrolling on desktop browsers that are less than 974 pixels wide. - Fixed a bug where soft-deleted Matrix blocks nested within Neo blocks could become duplicated when restored from a prior revision. ([#10256](https://github.com/craftcms/cms/issues/10256)) - Fixed a bug where Color fields’ HSL values could be incorrect. ([#10261](https://github.com/craftcms/cms/issues/10261)) - Fixed a bug where `