SaaS CMS has officially launched! Learn more now.

Magnus Baneryd
Sep 13, 2016
  3562
(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
Optimizely SaaS CMS Concepts and Terminologies

Whether you're a new user of Optimizely CMS or a veteran who have been through the evolution of it, the SaaS CMS is bringing some new concepts and...

Patrick Lam | Jul 15, 2024

How to have a link plugin with extra link id attribute in TinyMce

Introduce Optimizely CMS Editing is using TinyMce for editing rich-text content. We need to use this control a lot in CMS site for kind of WYSWYG...

Binh Nguyen Thi | Jul 13, 2024

Create your first demo site with Optimizely SaaS/Visual Builder

Hello everyone, We are very excited about the launch of our SaaS CMS and the new Visual Builder that comes with it. Since it is the first time you'...

Patrick Lam | Jul 11, 2024

Integrate a CMP workflow step with CMS

As you might know Optimizely has an integration where you can create and edit pages in the CMS directly from the CMP. One of the benefits of this i...

Marcus Hoffmann | Jul 10, 2024

GetNextSegment with empty Remaining causing fuzzes

Optimizely CMS offers you to create partial routers. This concept allows you display content differently depending on the routed content in the URL...

David Drouin-Prince | Jul 8, 2024 | Syndicated blog

Product Listing Page - using Graph

Optimizely Graph makes it possible to query your data in an advanced way, by using GraphQL. Querying data, using facets and search phrases, is very...

Jonas Bergqvist | Jul 5, 2024