Bryn Whyman,
CWP 2.3

The latest minor release for the Common Web Platform has arrived! CWP 2.3 introduces major upgrades to the CWP themes, plus the recent SilverStripe 4.4.0 release which includes a number of new features for Content Managers and improvements to the Developer experience aimed at delivering higher-performing websites.

As usual, this release follows semantic versioning(external link), so it’s ready to be used in any current CWP 2 project right now.

What’s new in CWP 2.3?

For Content Managers, this release includes a number of improvements and bugfixes to make the CMS more stable and usable. The biggest changes you’re likely to notice are fixes for public file URLs, an improved user experience for GridField buttons, and a new library of icons for the site tree.

Meanwhile, Developers will have their hands full with new APIs, enhancements, and security fixes, including:

  • Public files now have permanent URLs
  • Migration of legacy thumbnails
  • File migration is faster and more robust
  • CWP themes upgraded to Bootstrap 4
  • New GraphQL features

These and more are detailed below, or you can head straight to the changelogs.

Better Buttons are here

Originating seven years ago as an open source module developed by a SilverStripe community member, this functionality has now been built into the SilverStripe CMS.

Adapted to fit the new CMS design patterns, this new set of features drastically improves user experience, saving an untold number of clicks and page reloads by adding more functionality to the detail view of grid fields. Users can now add new records and paginate between records from within this view, resulting in less reliance on the back button.

New SiteTree icons

The previous icons used to distinguish page types in the SiteTree were relics from an old design paradigm. Our design team has replaced the old rasterised clip art with a library of slick font icons(external link) which Developers can now target declaratively with a definition of the $icon variable on a SiteTree class.

Optional upgrade to CMS and Framework 4.4.1

Note that this CWP release includes the SilverStripe CMS and Framework version 4.4.0.

For upgrades involving file migrations, especially those sites upgrading from CWP 1.x / SilverStripe 3.x, you should investigate bumping your composer.json requirements to the CMS and Framework version 4.4.1. We’ve noted in the following sections where you will want to consider upgrading to version 4.4.1. View the changelogs here(external link).

For instructions and some important considerations, see the CWP Developer documentation on how to use an alternative module version(external link).

Public files now have permanent URLs

In the previous CWP release(external link), a fix was provided that redirected existing broken links on a CWP 2 site. At that time, agencies were advised that a more complete fix would be provided in the future. This complete fix is now available with CWP 2.3. Utilising a new file path format, all new and existing files will be migrated over the moment they're saved and published.

There are some additional steps on top of upgrading to this CWP 2.3 release, so make sure to talk to your digital agency if this issue is currently affecting your site.

For Developers, you may recall that SilverStripe 4.0 introduced an abstraction of the assets layer(external link), allowing configuration of a SilverStripe installation to store files in any number of ways(external link), including remote storage like Amazon S3. In order to achieve this, files had to be stored with a “hash” in their path, for example: assets/[content-hash]/myfile.pdf.

Because the hash was based on file contents, replacing file contents would break existing incoming links, for example, from external websites or bookmarks. Over the last few minor releases, improvements have sought to mitigate this. But ultimately, the only long-term solution is to afford Developers a way to store these files in a path without the hash.

We’ve included a migration task that allows Developers to opt-in to the new file path format proactively, eliminating the need for redirects. Note that some of these improvements require SilverStripe 4.4.1.

Migration of legacy thumbnails

CWP 2.0 regenerated thumbnails in a different format, without moving thumbnails in the old format, leading to an increase in storage over time and duplicated effort. In 2.3, you can now purge the old thumbnail formats(external link).

File migration is faster and more robust

We’ve made several improvements to the migration task, including:

  • It’s now faster and less memory intensive
  • Updated to handle multiple edge cases that would previously have caused it to fail
  • The output has been improved to provide clearer information about the actions performed by the task
  • The task is now more modular, allowing Developers to run specific sub tasks individually

The file migration task documentation(external link) has been updated to provide clearer guidance when upgrading projects with a large number of files. A new optional task allows migration of file and image references in content created through CWP 1.x. The new shortcode format will retain those references, even if the files are moved. Note that some of these improvements require SilverStripe 4.4.1.

Planning on migrating files from CWP 1.x? If you’re migrating files from CWP 1.x to 2.3, you will want to use the 4.4.1 release, as this concurrent patch release contains critical bug fixes and optimisations for file migrations.

CWP themes upgraded to Bootstrap 4

With this release comes an upgrade to the two site themes provided with CWP. The Starter and Wātea themes have both been upgraded to take advantage of the latest major release of Bootstrap(external link)—an open source toolkit for developing front-end web projects.

The new versions of these themes will be most relevant to agencies who are either:

  • Investigating or planning to build (or rebuild) a new CWP site, or
  • Upgrading from CWP 1.x to CWP 2.x and are interested in refreshing the look and feel of their site.

New GraphQL features

One of the major limitations with scaffolding a “read” query in GraphQL was that it returned an all-inclusive list and there was no way to filter it to a subset of records. In CWP 2.3, these read queries now have a configurable “search” option.

You can also now store pre-baked GraphQL queries by ID on your GraphQL server, allowing consumers of your API to access them by reference rather than by a fully expressed query. This is useful for trimming the overhead of a request, and also improves security for websites that offer an API, but want to put boundaries around what can be queried.

Read more in the GraphQL README(external link).

DevelopmentAdmin CLI-only mode

DevelopmentAdmin now has CLI-only mode (off by default). The mode makes all dev/* controllers only accessible from CLI (for example, sake). To turn it on, add the following configuration to your project configs:

  deny_non_cli: true

Security fixes

CWP 2.3 contains a handful of security fixes, the details of which you can read in the Security section of the change log(external link). We highly encourage upgrading your CWP project to protect your site from these vulnerabilities.

Keen to get your upgrade underway?

Talk to your digital agency or Developer about upgrading to CWP 2.3.

Developers, head to our documentation to view the changelogs(external link) or check out the Upgrade Guide(external link).

Back to the news

Last modified: