dmytroduk / Duk.EPiServer.Disqus

Disqus integration for EPiServer based websites
Microsoft Reciprocal License
1 stars 5 forks source link

NullReferenceException while opening Episerver Admin page #13

Open azzimuth opened 6 years ago

azzimuth commented 6 years ago

I have copied an Episerver database from production to my computer but when I try to open the Admin page, I get the following exception:

[NullReferenceException: Object reference was not set to an instance of an object.]
Duk.EPiServer.Disqus.Models.Context.ContentContextProvider.GetContextInternal() +315
System.Lazy`1.CreateValue() +727
System.Lazy`1.LazyInitValue() +184
Duk.EPiServer.Disqus.UI.Models.EditModeClientResourceRegister.RegisterResources(IRequiredClientResourceList requiredResources, HttpContextBase context) +38
System.Collections.Generic.List`1.ForEach(Action`1 action) +14671646
System.Collections.Generic.List`1.ForEach(Action`1 action) +14671646
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3826

Any ideas? I have checked the Admin page for a working page, I cannot see any settings for Disqus plugin which might have been missing in the production database...

dmytroduk commented 6 years ago

@azzimuth could you check if you have Duk.EPiServer.Disqus and Duk.EPiServer.Disqus.UI NuGet packages installed on your local site?

azzimuth commented 6 years ago

I had them locally and the site started working as soon as I deleted both Duk.EPiServer.Disqus and Duk.EPiServer.Disqus.UI packages.