dnnsoftware / Dnn.Platform

DNN (formerly DotNetNuke) is the leading open source web content management platform (CMS) in the Microsoft ecosystem.
https://dnncommunity.org/
MIT License
1.02k stars 750 forks source link

No Persona bar after update from 8.0.4 to 9.1.1 #2611

Closed Ceten closed 5 years ago

Ceten commented 5 years ago

Summary

I'm in the process of updating a DNN install from 7.4 to 9.2. I followed the upgrade path and first updated from 7.4.2 to 8.4.2. After checking everything still functioned I updated to 9.1.1 which seemed to go fine too until the website loaded and I noticed the Persona bar was not loading. image

I checked the browser console and noted the following error:

Uncaught TypeError: Cannot read property 'NormalUpdate' of undefined
    at main.js?cdv=166&t=0.44484758900009647:526
    at l (knockout.js?cdv=166&t=0.9757429735691916:44)
    at Object.a.w.a.j (knockout.js?cdv=166&t=0.9757429735691916:47)
    at onResxLoaded (main.js?cdv=166&t=0.44484758900009647:525)
    at util.js?cdv=166&t=0.9757429735691916:69
    at Object.success (sf.js?cdv=166&t=0.9757429735691916:51)
    at j (jquery.js?cdv=166&t=0.9757429735691916:2)
    at Object.fireWith [as resolveWith] (jquery.js?cdv=166&t=0.9757429735691916:2)
    at x (jquery.js?cdv=166&t=0.9757429735691916:4)
    at XMLHttpRequest.<anonymous> (jquery.js?cdv=166&t=0.9757429735691916:4)

The code which throws the error is the following:

viewModel.updateText = ko.computed(function() {
  return viewModel.updateType() === 2 ? util.resx.PersonaBar.CriticalUpdate : util.resx.PersonaBar.NormalUpdate;
});

So util.resx.PersonaBar is undefined.

I searched for hours for a solution but couldn't find anything that worked. The Website folder is not in the root of the drive, all permissions are set correctly and I checked the bindingredirect for Newtonsoft.Json. I also tried to update to 9.2.2 but this resulted in an Empty Persona bar with a similar error.

Affected version

Do you have any ideas what could be causing this?

sleupold commented 5 years ago

did you clear local browser cache and cookies?

Ceten commented 5 years ago

Yes I did

Ceten commented 5 years ago

Anyone have any idea how I could fix this?

TopCat6 commented 5 years ago

In 9.2.2 I recently experienced an empty Persona bar (present but not populated) after someone uploaded an edited web.config file in binary mode. The end of the file had a bunch of NULs in it and other miscellaneous stuff from the body of the file. I removed everything past the proper end of the file and uploaded. My Persona bar then appeared and functioned properly. Worth checking. Wish your case is this simple.

sleupold commented 5 years ago

did you unblock the downnloaded upgrade package (in file properties) prior to unzipping the files contained and copying it over the existing files?

valadas commented 5 years ago

Hmm, is the file admin/personaBar/scripts/util.js present ? This is where the util.resx is initialized...

Do you get errors in the network tab of the browser developer tools (maybe some files not loading or 404 or 500 errors)?

Did you try different browsers?

Are there other javascript errors before the one for this issue, sometimes one failing script breaks others...

valadas commented 5 years ago

Also, does it happen in the same environment when you install a new 8.0.4 and then upgrade it ? If so, maybe revert then create a page with no modules and the default skin, then upgrade and try if it also happens on that page.

mitchelsellers commented 5 years ago

This issue was a support issue, and not a confirmed issue. Closing for now

cklenk commented 5 years ago

For anyone else, make sure you check your newtonsoft.dll versions. Third party modules can mess this up by overwriting the dll to a newer version.

illiniguy commented 4 years ago

For me this turned out to be a JSON serializer setting I had added in my custom web API code. In my RouteMapper.RegisterRoutes I had the following line:

config.Formatters.JsonFormatter.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();

As that's what I prefer for my endpoints. Commenting that line out fixed my problem as it was causing an issue with this DNN API call:

/API/personaBar/localization/gettable?culture=en-US

The code calling that endpoint expects Pascal case in the response. But my line of code above was converting all API calls to return camel case.

I'd check the API call above and make sure the property names are coming back as Pascal case.