November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi Petter.
I think it would be helpful to turn on debugging for Episerver's DOJO implementation. Atleast I've experienced that errors aren't propagating and understanding what's causing a malfunction are therefore hard.
Try and add following to your <EPiServer.Framework/> configuration section and see if that helps you getting closer:
<clientResources debug="true"/>
Casper Aagaard Rasmussen
I'm experiencing the exact same thing that Petter is describing.
After a little bit of investigation I see that the following JS exception is thrown when trying to load the component:
TypeError: Cannot read property 'some' of null(…) "TypeError: Cannot read property 'some' of nul
A little more debugging, and I see that "this.containedTypes" inHierarchicalListViewModel.js is always null, and that's why the exception is thrown.
Unfortunately I don't know why containedTypes is null, as it's properly set in the repository descriptor.
This has worked just fine in previous versions of EPiServer, so I suspect there's a bug or a breaking change I haven't noticed.
After a lot of frustration and debugging I've finally found the solution to this issue.
It seems like a bug in how the RepositoryKey formatted in javascript.
I have the following repository descriptor:
[ServiceConfiguration(typeof(IContentRepositoryDescriptor))] public class TestItemDescriptor : ContentRepositoryDescriptorBase { public static string RepositoryKey => "TestItemRepository"; public override string Key => RepositoryKey; ....
Notice the formatting of the RepositoryKey "TestItemRepository".
When EPiServer loads HierarchicalListViewModel.js, it reads the repository as an argument for the postscript method:
postscript: function (args) { this.inherited(arguments); this.contentRepositoryDescriptors = this.contentRepositoryDescriptors || dependency.resolve("epi.cms.contentRepositoryDescriptors"); declare.safeMixin(this, this.contentRepositoryDescriptors[args.repositoryKey]);
args.repositoryKey is then formatted as "testItemRepository", while the property in this.contentRepositoryDescriptors is as formatted in the repository descriptor ("TestItemRepository").
This causes this.contentRepositoryDescriptors[args.repositoryKey] in the above code not to find the descriptor, and returning null values.
Changing the repository key in the repository descriptor (C#) to "testItemRepository" fixes the problem - so that's the workaround. :)
Hi again, first of all, your help have saved me quite a bit of hair on my head!
I tried Caspers answer by turning on debugging, this was a great tip that I wasn't aware of, and will be using more if I experiece wierd UI stuff! By the time I could test these answers Øyvind had allready been working, and the fix for this surly works for me as well. Great catch as Daniel says! Thank you both for the good and quick help, this is why in my original post i said I would turn to the elite for answers ;)
I'm currently working on reporting this as a Bug to Epi, so this can be looked at.
Thanks again, Petter
Just updating the post with registered bug i.e #CMS-4070.
Thanks for your feedback.
Hi,
I have been creating a content provider for external videos (well tried at least). The provider it self seems to work just fine, and going in to "admin mode -> Set access rights" I can find my root folder pluss all the videos.
The problem for me occurs when I include the [Component] for viewing these items in the edit UI. The UI after a build loads up so I can see the content tree and assets (not the videos though), but the pages does not load in the "edit area", and a refresh of the page leaves everything blank, exept the top menu to navigate to admin mode and so on. I have had this error before, and never finished my content provider, but now I had the time to take another look at it.I get no Javascript error or anything in the epilog either.
So, just to see if I could get a simple one to work I created a completly fresh install of Epi, upgraded it to latest as of today. And added the simplest example I could. Still get the same error. Therefore I am turning to you, the elite, to see if I have left something out as I am starting to get blinded by my code. I have been using the HierarcicalList for showing my elements ( I have tried several of the other ones as well). What I did find out is that if I create my own little dojo, just outputting "This is some static text" everything works just fine (appart from not showing the elements of course). I'll include the code here in hopes of anyone seeing my fault/problem.
If I use the testmodel in the component, which is coded like below, the UI loads just fine.