Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Magnus Baneryd
Sep 13, 2016
  3514
(3 votes)

Planned Breaking Changes in CMS UI 2016

Remove support for legacy dot notation for dojo modules

We are removing the support for the legacy dot notation for dojo modules, e.g. epi-cms.editing.ContentPicker. This means that you need to change all EditorDescriptors, Components etc where you have defined your Dojo modules using the . to /.

It is really important that you change the code to use the AMD path syntax (/) in your code, both in C# and Javascript.

We have had support for AMD Path notation for a long time, so you can start changing your code to the slash AMD path notation right away. There is no need to wait for CMS 10.

From (Dot notation):

epi-cms.editing.ContentPicker

To (AMD path):

epi-cms/editing/ContentPicker

Aliases for epi/cms widgets are removed

As a result of the above mentioned changes to remove support for dot notation we’ve also removed the aliases that made it possible to require epi-cms widgets using epi/cms. Change your dependecies to use epi-cms.

epi/cms/form/SearchTextBox

From:

epi/cms/form/SearchTextBox

To:

epi-cms/form/SearchTextBox

epi/cms/form/PageInfoPicker

From:

epi/cms/form/PageInfoPicker

To:

epi-cms/form/PageInfoPicker

Objects of type epi._Dependency can no longer be created

Instead require the singleton dependency object “epi/dependency”.

EPiServer.Cms.Shell.UI.Rest.ContentQuery.GetContentByPermanentLinkQuery

GetContentByPermanentLinkQuery will always return the content without work id. It will ignore the “stripWorkId” parameter, it has also been moved into the EPiServer.Cms.Shell.UI.Rest.ContentQuery.Internal namespace

Dialog now has destroyOnHide:true by default

Set destroyOnHide to false if to keep the dialog around after it’s hidden. Otherwise there’s no need to set the value as we want to destroy dialogs by default to avoid memory leaks.

EPiServer.Cms.Shell.UI.Rest.Models.ExtendedVersionStatus

The value of ExtendedVersionStatus.Expired has been changed. Also added the new status ExtendedVersionStatus.AwaitingApproval, it has also been moved into the EPiServer.Cms.Shell.UI.Rest.Models.Internal

Calling watchModelChange and unwatchModelChange on _Command.js has been deprecated

Commands should always be allowed to update their internal state based on the current model.

Internal API

We are moving a lot of code that we consider to be part of our internal implementations into an Internal namespace. The full list will be available when we are closing in on the release.

Sep 13, 2016

Comments

Sep 13, 2016 02:19 PM

Hi,
So I'm already using "epi/dependency" module, but should we still resolve dependencies with dot notation? E.g.:
This works var contentRepositoryDescriptors = dependency.resolve("epi.cms.contentRepositoryDescriptors");
This doesn't var contentRepositoryDescriptors = dependency.resolve("epi-cms/contentRepositoryDescriptors");

Sep 13, 2016 02:35 PM

Maybe I'm just confused... but when should dot anotation be used, only in AMD? It doesn't work in module.config. E.g.:

This works


	
		
	

This doesn't work


	
		
	

It works in components

public YouTubeComponent()
        : base("epi-cms/component/Media")
 {
}

It also works in editor descriptors

public class TopicEditorDescriptor : EditorDescriptor
{
    public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable attributes)
    {
        SelectionFactoryType = typeof(TopicSelectionFactory);

        ClientEditingClass = "epi-cms/contentediting/editors/SelectionEditor";

        base.ModifyMetadata(metadata, attributes);
    }
}

Sep 14, 2016 01:13 PM

I can agree that it is a bit confusing, so I am going to try to clarify a bit.

In older versions of dojo (when it wasn't async) you loaded your Dojo modules using the . notation. e.g. dojo.require("dijit.forms.Button").
But when we moved to an async version of dojo we also moved over to the AMD module syntax, and in AMD you define the modules using the path syntax, e.g. dijit/forms/Button.

But we keept the . syntax for backwards compatibility for several major versions, be replaced the . with / when we loaded modules that was defined using dot notation.

So the change from . to / only applies for references to Dojo AMD modules, the things we require in javascript. Not for the things we put in the epi/dependency (that is just a key identifiers for a service) or .

Please login to comment.
Latest blogs
Solving the mystery of high memory usage

Sometimes, my work is easy, the problem could be resolved with one look (when I’m lucky enough to look at where it needs to be looked, just like th...

Quan Mai | Apr 22, 2024 | Syndicated blog

Search & Navigation reporting improvements

From version 16.1.0 there are some updates on the statistics pages: Add pagination to search phrase list Allows choosing a custom date range to get...

Phong | Apr 22, 2024

Optimizely and the never-ending story of the missing globe!

I've worked with Optimizely CMS for 14 years, and there are two things I'm obsessed with: Link validation and the globe that keeps disappearing on...

Tomas Hensrud Gulla | Apr 18, 2024 | Syndicated blog

Visitor Groups Usage Report For Optimizely CMS 12

This add-on offers detailed information on how visitor groups are used and how effective they are within Optimizely CMS. Editors can monitor and...

Adnan Zameer | Apr 18, 2024 | Syndicated blog