Version 5.6.0 release details
Last updated: 8th October 2019
Released: 7th October 2019
When upgrading your website to the latest version of Cohesion, database updates will be applied and therefore you can't roll back to the previous version of Cohesion once upgraded.
It is recommended applying updates on your development environment and backing up your website including your database before upgrading Cohesion.
This page is to detail the latest changes and updates regarding Cohesion version 5.6.0 and to give you an overview of how this may affect your experience with the platform.
There are the following known issues with version 5.6.0 of Cohesion:
- Entity reference revisions patch
When installing Cohesion on a new site a patch to Entity reference revisions is applied, this is no longer needed as version 1.7 includes the fix
The above issue has be resolved in version 5.6.1 of Cohesion.
Block element now available within Menu templates
The Block element can now be placed within a Cohesion Menu template. This can be useful for
Enable Cohesion on a theme
When creating a new theme that is Cohesion enabled, you will need to add
cohesion: true to the .info.yml of your theme.
Note, if you extend from the base 'cohesion_theme' you do not need to add this flag because the system will detect
the flag has been set in the parent theme. Your existing theme will continue work without modification.
Due to this change, the selector for the global Cohesion theme on the System settings configuration page DX8 > System settings has been removed.
Elements will be disabled by default and not shown in the Sidebar browser when using the Layout canvas field on a content entity
Using elements to create content means there is no separation between content and design. This approach is discouraged in favor of using Components which have a clear separation between content and design.
To discourage page creators from using primitive elements for content, they will now be disabled by default and not show in the Sidebar browser. When using the Layout canvas on content entities, Components will be shown first for all users.
Site builders can choose to enable primitive elements on the Layout canvas field within the field settings, although this is not recommended. Cohesion Helpers will still be available in the Sidebar browser unless they include primitive elements. In which case, they will be hidden.
Existing instances of the Layout canvas field on sites upgraded to this version will remain unaffected and can continue to use primitive elements on the Layout canvas, although this is not recommended.
"Existing selects" used in components are now dynamic, no longer hard coded on save
Selects chosen from the "Existing select" picker on a component will now dynamically load options when used in components. Previously the options were loaded when the component was created and not updated afterwards.
Modal trigger elements - 'Trigger ID' field
Focus will return to the body when a modal is closed. If you would like focus to return to your trigger element, you should give it a unique ID.
To make this easier, we've added a 'Trigger ID' field to elements that support the 'Open modal' interaction type.
These are currently:
You can still add an ID through 'Markup > Properties > Classes and ID' as with other elements, but this value will override the 'Trigger ID' value.
New component form field - Range slider
The range slider field can be used as an alternate input method for number-based fields in your components.
You can specify 'min', 'max' and 'step' values, as well as a default value within the specified range.
Find out more about the Range slider form element.
New dependency on the core RESTful Web Services module.
Cohesion is now using the 'RESTful Web Services' core module for its endpoints.
Before upgrading you MUST enable this module.
Removed experimental layout builder module
The removes the ability for site builders to see the content templates injected around the layout builder canvas at 'node/x/layout'
Other layout builder support is unaffected, including:
- Custom block templates can still be themed with Cohesion
DX8 > Templates > Content templates > Custom block type
- Tokens can still be used in custom blocks
- New "Drupal -> Content" element still available in the Cohesion sidebar browser.
Note: If cohesion_layout_builder is enabled on your site, you should uninstall that module before upgrading to this version of Cohesion.
Set the default cohesion sidebar list view
There is a new setting in the global cohesion settings page: DX8 > Configuration > System settings called "Default sidebar view style."
This allows the site administrator to set the default list view style of cohesion elements, components and helpers in the sidebar. Thumbnails are show by default.
As before, this setting can be changed by the user by clicking the toggle icon at the top of the sidebar and those changes persist across the browser session.
Existing sites being upgraded will see the original list view by default unless the user has already changed this for their session.
Webform usage plugin
If a Cohesion Custom style is used on a Webform entity, the style will now show as in-use by the Webform.
XSS validation in element forms
Cohesion now validates all element forms for script tags and other potentially dangerous markup using the Drupal core
Examples of potentially dangerous markup that are filtered:
<script> tags within markup prefix and suffix fields.
<object> tags within markup prefix and suffix fields.
href attributes that contain values prefixed with
There is a new permission that can be applied to certain roles to allow users to bypass this check: "Bypass XSS validation in element forms". This permission has the "restrict access" flag so will appear in the permissions table with the label "Warning: Give to trusted roles only; this permission has security implications."
If you're upgrading an existing site, it's important that you review your role permissions after the upgrade and only give this permission to users that absolutely need it (the 'user=1' administrator will have this permission by default).
Selecting images containing ampersands in the filename resulted in a server error
Fixed a bug where selecting an uploaded image where the filename contained an ampersand resulted in a server error.
Tokenizing values in styles on elements when building a component
Fixed a bug when tokenized values could be removed on element styles when switching between levels in the style tree.
Using global tokens in templates
Fixed a bug where using global tokens such as [current-page:title] was causing the generated twig to break or cause warnings to appear on the site.
Here are some recommended steps before upgrading your website to this version of Cohesion:
- Backup your websites database and code
- You must install the RESTful Web Services module
- You must uninstall DX8 Layout builder module if installed.
When upgrading to this version of Cohesion, it is recommended that you upgrade on a development environment, before upgrading a production website. Here are some recommended things to test:
- Check the Cohesion theme is rendering templates and styles as expected
- Check components using existing selects are working correctly
- It is recommended that you review your user permissions as this release contains some new user permissions.
It is recommended that you backup and upgrade your website on a development environment before applying to a production website. You can upgrade your version of DX8 by following our upgrade guide.
Have you found a bug?
If you have found a bug, raise a ticket with our Customer Success team on our help center and we will look into your issue.