CraftCMS v4.0.3 Release Notes

Release Date: 2022-05-20 // almost 2 years ago
  • ➕ Added

    • ➕ Added craft\elements\db\ElementQuery::prepareSubquery().

    🔄 Changed

    • Element edit pages now disable pointer events on the content container for 300 milliseconds after the “Showing your unsaved changes” notice is displayed. (#11229)
    • 👉 Users can now create drafts for entries they have permission to view, but not save. (#11249)
    • 👉 User Group condition rules are no longer available in element conditions when no user groups exist. (#11252)
    • Matrix blocks now have data-type-name attributes. (#11286)
    • Reversed the order of Lightswitch fields’ “ON Label” and “OFF Label” settings. (#11259)
    • craft\services\Elements::duplicateElement() now has a $trackDuplication argument.
    • craft\services\Matrix::duplicateBlocks() now has a $trackDuplications argument.

    🛠 Fixed

    • 🛠 Fixed a bug where dynamically-defined image transforms weren’t respecting the format param, unless the generateTransformsBeforePageLoad config setting was enabled.
    • 🛠 Fixed a bug where Table fields with Min Rows and Max Rows set to 1 were still showing a delete button. (#11211)
    • 🛠 Fixed an error that could occur when saving an Assets field that was restricted to a single location, at the root of a volume. (#11212)
    • 🛠 Fixed an error that could occur after a queue job execution had finished. (#11213)
    • 🛠 Fixed an error that could occur when saving an entry with Matrix blocks. (#11155)
    • 🛠 Fixed an error that occurred when saving a GraphQL schema without a scope. (#11240)
    • 🛠 Fixed an error that could occur when editing the public GraphQL schema, if a public token existed in the project config, but not the database. (#11218)
    • 🛠 Fixed some bugs with inconsistent asset indexing on Windows. (#11174), (#11219)
    • 🛠 Fixed a bug where custom fields weren’t available to be included as table attributes. (#11222)
    • 🛠 Fixed a bug where Alternative Text wasn’t available to be included as a table attribute. (#11222)immediately
    • 🛠 Fixed a JavaScript error that broke Matrix fields with Min Blocks and Max Blocks both set to 1. (#11233)
    • 🛠 Fixed a bug where request context logs could appear when nothing else was logged. (#11141)
    • 🛠 Fixed a bug where stack traces could be erroneously filtered from logs.
    • 🛠 Fixed a bug where removing an element from a relational field within an element editor could cause the editor to create a provisional draft, even if the element type didn’t support drafts. (#11242)
    • 🛠 Fixed a bug where draft editor pages had two identical “Save and continue editing” alternate form actions.
    • 🛠 Fixed a JavaScript warning that occurred when viewing an element edit page, if the user didn’t have permission to edit it.
    • 🛠 Fixed a bug where asset selector modals weren’t fully initializing for Assets fields, if they were targeting the user’s temp folder. (#11254)
    • 🛠 Fixed an error that occurred when saving an entry via a GraphQL mutation. (#11258)
    • 🛠 Fixed a bug where Matrix block types’ layout elements were getting new UUIDs assigned each time the Matrix field was edited. (#11248)
    • 🛠 Fixed a bug where the web-based installation wizard was throwing an exception if a database connection couldn’t be established, and there was no config/db.php file. (#11245)
    • 🛠 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)
    • 🛠 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)
    • 🛠 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)
    • 🛠 Fixed an error that could occur when applying a multi-site draft with relational fields. (#11220)
    • 🛠 Fixed a bug where Matrix blocks could be deleted from newly-created multi-site entries, if the edit page was reloaded. (#10906)