Geta / geta-optimizely-genericlinks

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

'Compare different versions' option doesn't work when adding an external link to a page #18

Closed jevgenijsp closed 1 year ago

jevgenijsp commented 1 year ago

How to reproduce:

image

I got "Preview is not available for this item" on the screen and this error in dev console:

epi.js:4092 TypeError: Cannot read properties of null (reading 'map')
    at Object._valueGetter (ItemCollectionViewModel.js:237:25)
    at Object._get (epi.js:4422:71)
    at Object.get (epi.js:4440:25)
    at Object._getValueAttr (ItemCollectionEditor.js:533:31)
    at Object.get (_WidgetBase.js:746:39)
    at _FormMixin.js:91:36
    at Object.forEach (dojo.js:3612:6)
    at Object._getValueAttr (_FormMixin.js:86:19)
    at Object.get (_WidgetBase.js:746:39)
    at Object._getValueAttr (FormContainer.js:114:50) "TypeError: Cannot read properties of null (reading 'map')\n    at Object._valueGetter (https://paragon.localtest.me:8443/EPiServer/Geta.Optimizely.GenericLinks/1.5.0/viewmodel/ItemCollectionViewModel.js:237:25)\n    at Object._get (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/epi/epi.js:4422:71)\n    at Object.get (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/epi/epi.js:4440:25)\n    at Object._getValueAttr (https://paragon.localtest.me:8443/EPiServer/CMS/12.22.1/ClientResources/epi-cms/contentediting/editors/ItemCollectionEditor.js:533:31)\n    at Object.get (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/dijit/_WidgetBase.js:746:39)\n    at https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/EPi/patch/dijit/form/_FormMixin.js:91:36\n    at Object.forEach (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/dojo/dojo.js:3612:6)\n    at Object._getValueAttr (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/EPi/patch/dijit/form/_FormMixin.js:86:19)\n    at Object.get (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/dijit/_WidgetBase.js:746:39)\n    at Object._getValueAttr (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/EPi/shell/widget/FormContainer.js:114:50)\n    ----------------------------------------\n    rejected at signalDeferred (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/dojo/dojo.js:8372:15)\n    at signalListener (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/dojo/dojo.js:8343:5)\n    at Deferred.then.promise.then (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/dojo/dojo.js:8546:5)\n    at when (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/dojo/dojo.js:9065:26)\n    at Object.<anonymous> (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/EPi/shell/widget/FormContainer.js:278:25)\n    at https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/dojo/dojo.js:3135:55\n    at runFactory (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/dojo/dojo.js:1107:43)\n    at execModule (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/dojo/dojo.js:1236:5)\n    at https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/dojo/dojo.js:802:7\n    at guardCheckComplete (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/dojo/dojo.js:1251:5)\n    ----------------------------------------\nError\n    at Deferred.then.promise.then (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/dojo/dojo.js:8540:24)\n    at when (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/dojo/dojo.js:9065:26)\n    at Object.<anonymous> (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/EPi/shell/widget/FormContainer.js:278:25)\n    at https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/dojo/dojo.js:3135:55\n    at runFactory (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/dojo/dojo.js:1107:43)\n    at execModule (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/dojo/dojo.js:1236:5)\n    at https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/dojo/dojo.js:802:7\n    at guardCheckComplete (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/dojo/dojo.js:1251:5)\n    at contextRequire (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/dojo/dojo.js:801:6)\n    at req (https://paragon.localtest.me:8443/EPiServer/Shell/12.22.1/ClientResources/dojo/dojo.js:137:11)"
svenrog commented 1 year ago

This has been addressed in v1.6.1 and submitted to https://nuget.optimizely.com/

svenrog commented 1 year ago

@jevgenijsp can you upgrade and verify that this is fixed?

jevgenijsp commented 1 year ago

@svenrog

Yes, it is fixed in the newest version.

But I noticed another problem, I'll create a new ticket.