That code snippet subscribes to an event that you publish in your SiteAttention add-on. You will need to look into your code to see when that event should be published. This might help you discover why it is no longer doing so. Otherwise you will need to share the code so we can see in what context it is being called and maybe then we can help you.
In the postcreate function we are subscribing and posting.
In Episerver version 9 and 10, this triggers correct modelchange on first click (IE when you change a page) but in Episerver 11.x it does not trigger until second click of that link. So my question is what have changed?
And the below warning i also added, but cannot find any documentation for.
Thanks
These are the breaking changes done in CMS 11 https://world.episerver.com/documentation/upgrading/Episerver-CMS/cms-11/breaking-changes-cms-11/
The obsolete warnings should not cause any issue. They are meant to alert developers to something that will be removed in a future version, and recommend an alternative. If you have any usages of epi/shell/_StatefulGetterSetterMixin then you should consider refactoring these.
Otherwises, without some sort of source code to look at, I am unable to help you.
Hi Ben,
I have seen those changes but they do not describe what has changed since first reload is not working anymore. Looking at it Epi has since version 9 been using Dojo 1.8.9 so it does not explain why the change in behaviour. And the breaking changes does not sugges any solutions.
The 'epi/shell/_StatefulGetterSetterMixin' were are not using in our code, which makes even more mysterical.
The specific used for the first issue:
postCreate: function () { ... if (!EPiServerSiteAttentionData.OnModelChangeSubscribed) { topic.subscribe("siteattention/modelchanged", lang.hitch(this, "_onModelChanged")); EPiServerSiteAttentionData.OnModelChangeSubscribed = true; } when(this.getCurrentContent(), function (contentData) { topic.publish("siteattention/modelchanged", { contentData: contentData }); }); }, ...
And the function that is never called on first click in Episerver 11 which works in 9 and 10:
_onModelChanged: function (model) { SiteAttentionEpiServerWatcher.updateBaseModel(model); ... });
From what I can tell, those code snippets should still work the same in CMS 11. We haven't changed anything in the getCurrentContent method. I'm afraid that I can't be of much help.
I would recommend contacting our support team and creating a support case.
I'm seeing the same obsolete warnings after upgrading to Episerver 11, also have no references in our own code. If a fix or explanation should appear, please share :)
We obsoleted _StatefulGetterSetterMixin after releasing CMS 11. Unfortunetly we have one usage within CMS UI that can't be removed without causing a breaking change. This is what will be causing the warning.
Hi Ben,
Thank you.
We also see the following when debugging (Chrome console) which is not coming from our side:
1: ComponentController::loadComponents widgets.js:2 1: 574.753173828125ms widgets.js:2 2: FormContainer::_setupUI undefined widgets.js:2 2: 68.19189453125ms widgets.js:2 3: FormContainer::_setupUI undefined widgets.js:2 3: 486.254150390625ms widgets.js:2 4: FormContainer::_setupUI undefined widgets.js:2 4: 44.705810546875ms widgets.js:2 5: FormContainer::_setupUI undefined widgets.js:2 5: 41.720947265625ms
Does anyone know the solution to the errors above? we're getting the same ones in the console after upgrading to v11.6 and trying to load a custom Dojo-widget.
Hi,
We are seeing some different behaviours in epi version 11.x
On 9 and 10 we used:
which works fine, but it is not getting called on first load in Epi11.
Any guidance?
UPDATE:
Get this in the console log as well (not sure how to change it):