Geta / geta-optimizely-genericlinks

An extensive alternative to LinkItemCollection in Optimizely.
Apache License 2.0
4 stars 0 forks source link

GenericLinks (v1.8.0) crashes Admin UI after updating EPiServer.CMS.UI (v12.24.0) #25

Closed kaspars-ozols closed 10 months ago

kaspars-ozols commented 10 months ago

What is the problem

After package update to the latest versions, Optimizely Admin UI fails to load if page contains a property of type LinkDataCollection<T>.

The UI completely locks up - not even page name gets displayed. image

Changes to any properties are not detected. It is not possible to (simply) roll back package update as Optimizely data migrations have been performed.

What have we tried

Adding [ScaffoldColumn(false)] on properties of type LinkDataCollection<T> makes UI responsive again. Which suggests that the package is causing this.

What is the setup / versions used

<PackageReference Include="Geta.Optimizely.GenericLinks" Version="1.8.0" />

<PackageReference Include="EPiServer.CloudPlatform.Cms" Version="1.4.0" />
<PackageReference Include="EPiServer.CloudPlatform.Commerce" Version="1.1.2" />
<PackageReference Include="EPiServer.CMS" Version="12.24.0" />
<PackageReference Include="EPiServer.CMS.AspNetCore.HtmlHelpers" Version="12.19.1" />
<PackageReference Include="EPiServer.CMS.AspNetCore.Mvc" Version="12.19.1" />
<PackageReference Include="EPiServer.CMS.AspNetCore.Routing" Version="12.19.1" />
<PackageReference Include="EPiServer.CMS.AspNetCore.Templating" Version="12.19.1" />
<PackageReference Include="EPiServer.CMS.Core" Version="12.19.1" />
<PackageReference Include="EPiServer.CMS.UI" Version="12.24.0" />
<PackageReference Include="EPiServer.CMS.UI.Core" Version="12.24.0" />
<PackageReference Include="EPiServer.Commerce" Version="14.15.3" />
<PackageReference Include="EPiServer.Find.Commerce" Version="12.1.3" />
<PackageReference Include="EPiServer.Framework" Version="12.19.1" />
<PackageReference Include="EPiServer.Hosting" Version="12.19.1" />
<PackageReference Include="EPiServer.Labs.LanguageManager" Version="5.2.0" />
<PackageReference Include="EPiServer.OpenIDConnect.UI" Version="3.9.1" />
<PackageReference Include="EPiServer.ServiceApi.Commerce" Version="7.0.2" />

What is the actual error

There is an error displayed in browser console:

epi.js:4093 TypeError: this.model.hasReachedItemsLimit is not a function
    at Object._renderUI (ItemCollectionEditor.js:621:47)
    at Object.dispatcher [as oninitCompleted] (dojo.js:6145:59)
    at on.emit (dojo.js:5719:37)
    at on.emit (dojo.js:5761:29)
    at Object.emit (dojo.js:6040:19)
    at Object.inherited__debug [as inherited] (dojo.js:4194:19)
    at Object.emit (_ViewModelMixin.js:48:18)
    at ItemCollectionViewModel.js:173:16
    at signalListener (dojo.js:8325:21)
    at Deferred.then.promise.then (dojo.js:8546:5) 'TypeError: this.model.hasReachedItemsLimit is not a function\n    at Object._renderUI (https://masked.localtest.me:8443/EPiServer/CMS/12.24.0/ClientResources/epi-cms/contentediting/editors/ItemCollectionEditor.js:621:47)\n    at Object.dispatcher [as oninitCompleted] (https://masked.localtest.me:8443/EPiServer/Shell/12.24.0/ClientResources/dojo/dojo.js:6145:59)\n    at on.emit (https://masked.localtest.me:8443/EPiServer/Shell/12.24.0/ClientResources/dojo/dojo.js:5719:37)\n    at on.emit (https://masked.localtest.me:8443/EPiServer/Shell/12.24.0/ClientResources/dojo/dojo.js:5761:29)\n    at Object.emit (https://masked.localtest.me:8443/EPiServer/Shell/12.24.0/ClientResources/dojo/dojo.js:6040:19)\n    at Object.inherited__debug [as inherited] (https://masked.localtest.me:8443/EPiServer/Shell/12.24.0/ClientResources/dojo/dojo.js:4194:19)\n    at Object.emit (https://masked.localtest.me:8443/EPiServer/CMS/12.24.0/ClientResources/epi-cms/contentediting/viewmodel/_ViewModelMixin.js:48:18)\n    at https://masked.localtest.me:8443/EPiServer/Geta.Optimizely.GenericLinks/1.8.0/viewmodel/ItemCollectionViewModel.js:173:16\n    at signalListener (https://masked.localtest.me:8443/EPiServer/Shell/12.24.0/ClientResources/dojo/dojo.js:8325:21)\n    at Deferred.then.promise.then (https://masked.localtest.me:8443/EPiServer/Shell/12.24.0/ClientResources/dojo/dojo.js:8546:5)\n    ----------------------------------------\n    rejected at signalDeferred (https://masked.localtest.me:8443/EPiServer/Shell/12.24.0/ClientResources/dojo/dojo.js:8372:15)\n    at signalListener (https://masked.localtest.me:8443/EPiServer/Shell/12.24.0/ClientResources/dojo/dojo.js:8343:5)\n    at Deferred.then.promise.then (https://masked.localtest.me:8443/EPiServer/Shell/12.24.0/ClientResources/dojo/dojo.js:8546:5)\n    at Object._init (https://masked.localtest.me:8443/EPiServer/Geta.Optimizely.GenericLinks/1.8.0/viewmodel/ItemCollectionViewModel.js:171:23)\n    at Object._dataSetter (https://masked.localtest.me:8443/EPiServer/Geta.Optimizely.GenericLinks/1.8.0/viewmodel/ItemCollectionViewModel.js:247:12)\n    at Object.set (https://masked.localtest.me:8443/EPiServer/Shell/12.24.0/ClientResources/epi/epi.js:4485:33)\n    at Object._setValueAttr (https://masked.localtest.me:8443/EPiServer/CMS/12.24.0/ClientResources/epi-cms/contentediting/editors/ItemCollectionEditor.js:552:41)\n    at Object.set (https://masked.localtest.me:8443/EPiServer/Shell/12.24.0/ClientResources/dijit/_WidgetBase.js:785:24)\n    at Object.setEditorValue (https://masked.localtest.me:8443/EPiServer/CMS/12.24.0/ClientResources/epi-cms/contentediting/_EditorWrapperBase.js:359:20)\n    at Object.inherited__debug [as inherited] (https://masked.localtest.me:8443/EPiServer/Shell/12.24.0/ClientResources/dojo/dojo.js:4194:19)\n    ----------------------------------------\nError\n    at Deferred.then.promise.then (https://masked.localtest.me:8443/EPiServer/Shell/12.24.0/ClientResources/dojo/dojo.js:8540:24)\n    at Object._init (https://masked.localtest.me:8443/EPiServer/Geta.Optimizely.GenericLinks/1.8.0/viewmodel/ItemCollectionViewModel.js:171:23)\n    at Object._dataSetter (https://masked.localtest.me:8443/EPiServer/Geta.Optimizely.GenericLinks/1.8.0/viewmodel/ItemCollectionViewModel.js:247:12)\n    at Object.set (https://masked.localtest.me:8443/EPiServer/Shell/12.24.0/ClientResources/epi/epi.js:4485:33)\n    at Object._setValueAttr (https://masked.localtest.me:8443/EPiServer/CMS/12.24.0/ClientResources/epi-cms/contentediting/editors/ItemCollectionEditor.js:552:41)\n    at Object.set (https://masked.localtest.me:8443/EPiServer/Shell/12.24.0/ClientResources/dijit/_WidgetBase.js:785:24)\n    at Object.setEditorValue (https://masked.localtest.me:8443/EPiServer/CMS/12.24.0/ClientResources/epi-cms/contentediting/_EditorWrapperBase.js:359:20)\n    at Object.inherited__debug [as inherited] (https://masked.localtest.me:8443/EPiServer/Shell/12.24.0/ClientResources/dojo/dojo.js:4194:19)\n    at Object.setEditorValue (https://masked.localtest.me:8443/EPiServer/CMS/12.24.0/ClientResources/epi-cms/contentediting/SideBySideEditorWrapper.js:108:18)\n    at Object._setValueAttr (https://masked.localtest.me:8443/EPiServer/CMS/12.24.0/ClientResources/epi-cms/contentediting/_EditorWrapperBase.js:364:18)'
svenrog commented 10 months ago

Try with 1.8.1 and see if that fixes it.