Version:
Cohesiondx.com

    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.

    Overview

    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. 

    Known issues

    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.

    Highlights

    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:

    • Link
    • Button
    • Container
    • Column
    • Slide

    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 Xss::filterAdmin utility. 
    Examples of potentially dangerous markup that are filtered:

    <script> tags within markup prefix and suffix fields. 
    <object> tags within markup prefix and suffix fields. 
    onClick and other Javascript event attributes. 
    Custom href attributes that contain values prefixed with :javascript:

    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).

    Bypassing this check to add javascript libraries or snippets in elements is not recommended. Javascript libraries should be added to source control within your theme or a custom module and attached programmatically via the Drupal core library system: https://www.drupal.org/docs/8/api/javascript-api/add-javascript-to-your-theme-or-module

    Bug fixes

    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.

    Steps before upgrading

    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.

    Testing notes

    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.

    Upgrade

    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.

     
     
     
     
     
    Cohesion DX8 Help center

    Launch our Help center to raise a support ticket or search our knowledge base of common questions and answers.

    DX8 knowledge base icon

    Knowledge base

    Get instant answers to common questions. Available online 24/7.

    Find answers

    Raise a ticket icon

    Raise a support ticket

    Log in to the Help center to raise an issue. Available Monday - Friday, 09:00 - 17:00 GMT.

    Raise ticket