Skip to main content

New in Craft CMS 4.5

Craft 4.5 is a release for teams. Most of what's in it involves several people working on the same content at the same time, with a few developer additions alongside.

Dieser Artikel ist über 2 Jahre alt. Beschriebene Funktionen und Vorgehensweisen können sich seitdem geändert haben.

Activity Indicators

When other authors are editing the same entry or category, their avatars now show up in the page header, and hovering over one tells you what that person is doing. The part the announcement doesn't mention is arguably more useful: if someone else saves the element while you have it open, you get a notification. The avatars tell you who's around, the notification tells you when it actually matters.

I'd been running the 4.5 beta on a project with four or five editors, and nobody ever mentioned any of it to me in either direction. Which is probably how it should be: these features exist to prevent something from happening, and nobody reports a collision that didn't occur.

Gradicons

Users without a profile photo now get a gradicon, their initials over one of 272 color gradients. Cosmetic, but it does make the activity indicators readable at a glance, because everyone looks different even without a photo.

Shareable Element Filters

Element index filters are now tracked in the URL. Send a colleague the address, and they get the same filtered view. What I'll use more often is the side effect: the filters survive the browser back button, so returning to an index no longer means setting everything up again.

Validation Summaries

When an entry can't be saved, all validation errors are now summarized at the top of the page, with links to the offending fields. On a long entry with several tabs, that saves a hunt. The summary also mentions errors on other sites, which is the part that matters on multi-site projects, where a failed save could previously leave you staring at a form that looked perfectly fine.

Table Field Improvements

Table fields now have a "Row heading" column option that labels each row and a "Static Rows" setting that locks rows in place, preventing editors from adding or removing them. Together they turn the Table field into a proper key/value interface: you define the left column, the editor fills in the right one. A third change fits the same direction: if all heading values are blank, the heading row is no longer shown.

I built exactly this on a logistics project: container specifications, the same rows in the same order on every entry, with only the values changing. Before, that meant either a Matrix field or hoping nobody reordered anything.

Secrets

Sensitive values like API keys can now be stored in a dedicated secrets PHP file, identified by the `CRAFT_SECRETS_PATH` environment variable. Unlike environment variables, they stay out of server logs and phpinfo() output.

_globals in Twig

Front-end templates get a new `_globals` variable for storing values in a global scope, so includes and macros can pass data around without the usual workarounds.

Conclusion

The activity indicators are the part of 4.5 worth arguing about. WordPress has had post locking for ten years, though it solves the problem differently: only one person can edit a post at a time, and getting in means throwing the other one out.

Craft shows you who's there, tells you when something changes, and leaves the decision to you. I prefer that, but it's worth noting that Craft is only now addressing a problem others solved long ago. It's the right thing to build, and it's overdue.

For a solo project, there's less in it. The validation summaries save real time on long entries, and the table field settings are the ones I'll reach for again. Check the full changelog for everything not covered here.
 

Thomas Sausen

Webentwickler

Selbstständiger Webentwickler, der 2005 mit WordPress-Websites anfing, dann zu ExpressionEngine wechselte und 2013 sein Herz an Craft CMS verlor. Als Gründer von Craftentries, berichtet er seit 2015 über das Craft-Ökosystem.