Magnus Baneryd
Sep 13, 2016
  3643
(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
I'm running Optimizely CMS on .NET 9!

It works 🎉

Tomas Hensrud Gulla | Nov 12, 2024 | Syndicated blog

Recraft's image generation with AI-Assistant for Optimizely

Recraft V3 model is outperforming all other models in the image generation space and we are happy to share: Recraft's new model is now available fo...

Luc Gosso (MVP) | Nov 8, 2024 | Syndicated blog

ExcludeDeleted(): Prevent Trashed Content from Appearing in Search Results

Introduction In Optimizely CMS, content that is moved to the trash can still appear in search results if it’s not explicitly excluded using the...

Ashish Rasal | Nov 7, 2024

CMS + CMP + Graph integration

We have just released a new package https://nuget.optimizely.com/package/?id=EPiServer.Cms.WelcomeIntegration.Graph which changes the way CMS fetch...

Bartosz Sekula | Nov 5, 2024

Block type selection doesn't work

Imagine you're trying to create a new block in a specific content area. You click the "Create" link, expecting to see a CMS modal with a list of...

Damian Smutek | Nov 4, 2024 | Syndicated blog

.NET 8 FAQ

I have previously written about .NET compatibility in general and .NET 8 in particular, see blog posts here , here and here . With the end of suppo...

Magnus Rahl | Nov 4, 2024