Craft 6 beta 1: the breaking changes that'll bite
Craft CMS 6.0.0-beta.1 landed on 10 November, and the headline features are the shiny ones: a command palette, an "Ask AI" chat beside every control panel screen, a Compare screen for drafts and revisions. I'm more interested in the other half of the release notes: the upgrade warnings. If you have a Craft 5 site you want to move, that list decides how your week goes.
Changes that fail loudly
Some breaks announce themselves. routes.php is no longer supported; you are meant to use Laravel routing, although site routes in config/craft/routes.php keep working through the Yii adapter and are flagged as deprecated. Craft-managed filesystems are gone, so volumes now point at Laravel disks from config/filesystems.php, and a disk you never configured throws an error. Craft and Yii migrations were replaced by Laravel migrations, the Debug Toolbar is replaced by Laravel Debugbar, and legacy email transport settings give way to Laravel's mail config. Annoying, but you will see these on the first request.
Changes that fail quietly
These are the ones I would grep for before touching production, because nothing crashes:
- Element queries:
orderBy(),select()andgroupBy()now quote strings as column names. Any raw SQL expression you pass there needsexpression()orDB::raw(). - Twig iteration: looping over elements no longer includes custom field values. Templates that relied on that will render gaps rather than errors.
- Saves: an element save with no posted status no longer force-enables the element. A custom front-end form that depended on the old behaviour can now leave entries disabled.
- Pagination: it uses the
pageTriggerquery parameter instead of path segments, so hard-coded/p2-style links and any cached or indexed URLs need a look. - Login and sessions: logout requires a CSRF-protected POST,
loginPathdefaults tofalse, and visitors without a session no longer get one. The notes also say sites should send a suitableReferrer-Policy. - GraphQL: the
levelargument is now[QueryArgument], so variables must be declared with that type.
The query quoting change is the one I would test first. A sort like orderBy('FIELD(id, 3, 1, 2)') used to work as raw SQL; under the new rule you must say so explicitly. That is a security-positive change, since string input no longer slides into a SQL fragment, but it means a repo-wide search for orderBy(, select( and groupBy( is step one.
Data you cannot get back
Two items touch stored state. Craft 5 transform settings are not carried over, and upgrading clears the transform index; the old transform files are neither reused nor deleted, so expect regenerated images and some orphaned disk usage. UK counties are now stored by ISO code, with existing addresses migrated automatically. Both argue for the same habit: take a database backup and a copy of the asset volume before you try the upgrade, and then restore it once to prove the backup works.
A couple of removals deserve a mention too. The release notes list several dropped general settings, including allowedGraphqlOrigins, enableTwigSandbox, omitScriptNameInUrls and usePathInfo. Entries and assets also can no longer be deleted for the only site they exist in, and categories, global sets and tags are deprecated.
My plan is boring: this is a beta, so I will run it on a throwaway clone, install the Yii adapter (craftcms/yii2-adapter) to keep Craft 5 config and plugins alive, and work through the quiet-failure list above before I let the shiny features distract me. The command palette will still be there afterwards.