Try our conversational search powered by Generative AI!

IList<ContentReference> property not rendering correct in edit mode after upgrade.

Vote:
 

Hi!

We just upgraded to 12.17.1 and after that our properties of the type IList<ContenteReference> is not rendered properly.

I get this error message:

Unable to load /EPiServer/cms/Stores/contentstructure/ status: 500
SyntaxError: Unexpected token '<'
    at dojo.fromJson (dojo.js:15:82234)
    at Object.json (dojo.js:15:120242)
    at _497 (dojo.js:15:123066)
    at _2cd (dojo.js:15:73012)
    at _2cb (dojo.js:15:72704)
    at resolve.callback (dojo.js:15:73525)
    at dojo.js:15:125114
    at _2f2 (dojo.js:15:75368)
    at _2ec (dojo.js:15:75232)
    at _2f1.resolve (dojo.js:15:76693)
System.ArgumentNullException: Value cannot be null. (Parameter 'contentLink')
   at EPiServer.Core.Internal.ContentInstanceCache.GetCacheKey(ContentReference contentLink, String language)
   at EPiServer.Core.Internal.ContentInstanceCache.TryGet(ContentReference contentLink, String language, IContent& instance)
   at EPiServer.Core.ContentProvider.GetScatteredContents(IEnumerable`1 contentLinks, ILanguageSelector selector)
   at EPiServer.Core.Internal.ProviderPipelineImplementation.GetItems(ContentProvider provider, IList`1 contentLinks, LoaderOptions loaderOptions)
   at EPiServer.Core.Internal.DefaultContentLoader.GetItems(IEnumerable`1 contentLinks, LoaderOptions loaderOptions)
   at EPiServer.Core.Internal.DefaultContentRepository.GetItems(IEnumerable`1 contentLinks, LoaderOptions settings)
   at EPiServer.Cms.Shell.Service.Internal.ContentLoaderService.GetItems(IEnumerable`1 contentReferences, LoaderOptions loaderOptions)
   at EPiServer.Cms.Shell.UI.Rest.Internal.ContentStore.List(IEnumerable`1 ids)
   at lambda_method2622(Closure , Object , Object[] )
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.ResponseCaching.ResponseCachingMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
{
    "url": "/EPiServer/cms/Stores/contentstructure/",
    "headers": {
        "Accept": "application/javascript, application/json",
        "Content-Type": "application/json",
        "X-Http-Method-Override": "List",
        "RequestVerificationToken": "CfDJ8EG1TFyXU-lFgyXJyxqjaciGYcnHMVZUMp5aTY-XMqC0vl930gA7w20NqUytqrTy_l2-3AT4QnBG29H4vw6spEKX33v8PRG7CCfdfglnco-JGAuXdzzAFRjMizKTxlfFzo4ROsNsBvDvPQIFjRpoTuBYgbj6K9y9RogC7JU-gO_IEAxBBhas00F4mInlOFeGfQ",
        "X-EPiCurrentContentContext": "252565_756054",
        "X-EPiContentLanguage": "sv"
    },
    "postData": "[\"43658\",\"44775\",\"257806\",\"38058\",\"38017\",\"280207\",\"41828\",\"\",\"38870\"]",
    "handleAs": "json"
}
}

Some properties of that type is actually rendered correctly so it might have something with the data stored?
The page with the invalid property renders correctly when I view it so there is data stored in the database. Also adding removing references programaticlly works fine, the property is updated and not other data is lost.

Data in the database is stored like this:

["e27309f5-0e90-46dc-bc6d-5e5e200d96ef","daf5c87a-662b-4ee4-9eb2-4a93dc7c4689","1ef05eb0-a6e2-4ba9-ba5d-a170827d34a9","8170c16d-0cff-4ad9-8f3c-247b4c5294ef","8ff2a7f3-ed09-4302-98c4-7097ee93983f","e6d6d915-7c2f-4c10-ab50-c04d7d535006","80e42179-c784-4ef1-8740-524cfd5b7a66","ef2cba23-0d59-4ea2-adba-71c4b1d2cc16","f15b07e7-9ebd-4873-b510-fce3cf03a1b1"]

It is nine links rendered is only eight so could it be that one of the links is invalid and that the edit mode cannot handle that? And in the "postData" it looks like one of the links are empty.

Not sure where to start here. 

Thanks!

/Kristoffer

#308706
Edited, Sep 19, 2023 16:43
Vote:
 

Hello,

We're having the same issue. Have you found a solution to this by any chance? We're also contacting support regarding our issue.

#313000
Nov 23, 2023 10:02
Vote:
 

This was a known bug but should have been resolved in newer versions of CMS 

https://world.optimizely.com/support/bug-list/bug/CMS-27369

#313003
Nov 23, 2023 15:43
Vote:
 

We updated the CMS packages from 12.23.1 to 12.25.1, after which the problem disappeared. It's probably bug CMS-29726  but then on a ContentArea rather than an IList<T>. 🎉

#313052
Nov 24, 2023 12:19
Vote:
 

Hi!

It is this bug: https://world.optimizely.com/support/bug-list/bug/CMS-27894

And it is fixed in EPiServer.CMS.UI 12.21.0

/Kristoffer

#313657
Dec 04, 2023 14:30
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.