Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean Install of DNN v9.06.02 throwing a lot of errors from PersonaBar MenuController #3906

Closed
jeremy-farrance opened this issue Jul 13, 2020 · 4 comments · Fixed by #3936
Closed

Comments

@jeremy-farrance
Copy link
Contributor

Note: this was already confirmed by @valadas (Daniel Valadas) who ask me to post this issue/details.

Description of bug and Steps to reproduce

After a new/clean install of DNN v9.06.02 and logged in as a super user, go immediately to the Logs (Settings, Servers, Server Settings Tab, then the LOGS sub-tab). Expand (cool new feature, eh?) today's 2020.07.NN.log.resources file. Skip the CKEditor issues, that will need a separate bug report.

Current behavior

It appears that ever time DNN needs to iterate through the PersonaBar's Manage and Settings "pages" it throws 21 pairs menu related errors. 12 failed calls to AdminMenuController and 9 fails for HostMenuController all with Value cannot be null in parameter name Type.

Expected behavior

DNN should not be throwing errors like this "out of the box" and rapidly growing the size of the *.logs.resources files in /Portals/_default/Logs/.

Error information

2020-07-12 18:15:02.242-05:00 [DS2035][D:11][T:24][ERROR] DotNetNuke.Framework.Reflection - Dnn.PersonaBar.Sites.MenuControllers.AdminMenuController, Dnn.PersonaBar.Extensions
System.TypeLoadException: Could not load type 'Dnn.PersonaBar.Sites.MenuControllers.AdminMenuController' from assembly 'Dnn.PersonaBar.Extensions'.
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
   at System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
   at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
   at DotNetNuke.Framework.Reflection.CreateType(String TypeName, String CacheKey, Boolean UseCache, Boolean IgnoreErrors)
2020-07-12 18:15:02.273-05:00 [DS2035][D:11][T:24][ERROR] Dnn.PersonaBar.Library.Controllers.PersonaBarController - System.ArgumentNullException: Value cannot be null.
Parameter name: type
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at Dnn.PersonaBar.Library.Controllers.PersonaBarController.GetMenuItemController(MenuItem menuItem)

Additional context

I have a DNN install that started life as 9.04.04, was upgraded recently to 9.06.01, then upgraded to 9.06.02 and the errors (above) are not being thrown.

Affected version

[ x ] 09.06.02 final

Affected browser - not browser related in any way

@valadas
Copy link
Contributor

valadas commented Jul 13, 2020

Confirmed and triaged thanks @jeremy-farrance

@jeremy-farrance
Copy link
Contributor Author

Not sure if it helps, but the error pair is only being throw for the following PB pages:
Manage / AdminLogs - 3 times
Manage / Sites - 6 times (prolly 3 times each for Sites and SiteGroups)
Settings / CssEditor - 3 times
Settings / Licensing - 3 times
Settings / SqlConsole - 3 times
Settings / TaskScheduler - 3 times

@DarthFabius
Copy link

From Dnn.PersonaBar.Extensions.dnn file :
<component type="PersonaBarMenu"> <menu> <identifier>Dnn.TaskScheduler</identifier> <moduleName>TaskScheduler</moduleName> <controller>Dnn.PersonaBar.TaskScheduler.MenuControllers.HostMenuController, Dnn.PersonaBar.Extensions</controller> <resourceKey>nav_TaskScheduler</resourceKey> <path>TaskScheduler</path> <parent>Settings</parent> <order>60</order> </menu> </component>

On 9.6.2 sln missing the file "TaskSchedulerMenuController.cs" where it's defined the class :"Dnn.PersonaBar.TaskScheduler.MenuControllers.HostMenuController"
Cattura

From v. 9.6.1.
Cattura

You can solve the problem related to excessive logs by replacing the dll with its previous version (9.6.1)

@jeremy-farrance
Copy link
Contributor Author

The above idea works, I simply copied /bin/Dnn.PersonaBar.Extensions.dll from a 9.06.01 install to one of my 9.06.02 installs. However, there is a side effect. Once this is in place, the 9.06.02-enhanced Settings/Servers/Server Settings tab, LOGS sub-tab is broken and throws the error (below) when you try to view/expand a log (pic below).

2020-07-13 08:27:30.682-05:00 [DS2035][D:6][T:180][ERROR] Dnn.PersonaBar.Servers.Services.ServerSettingsLogsController - System.IO.FileNotFoundException: 
Could not find file 'C:\HostingSpaces\METZ\midwest-reconstruction.com\www\portals\_default\logs\undefined'.
File name: 'C:\HostingSpaces\METZ\midwest-reconstruction.com\www\portals\_default\logs\undefined'
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
   at System.IO.StreamReader..ctor(String path)
   at System.IO.File.OpenText(String path)
   at Dnn.PersonaBar.Servers.Services.ServerSettingsLogsController.GetLogFile(String fileName)

image

valadas added a commit to valadas/Dnn.Platform that referenced this issue Jul 27, 2020
Closes dnnsoftware#3906

Apparently some files where deleted as part of dnnsoftware#3843

This PR brings those files back and also fixes stylecop warnings. Some class names had to be changed both for clarity and to respect stylecop rule that the file name should match the class name. Because of that change, the dnn manifest was also changed so it all works with the new names.
david-poindexter pushed a commit that referenced this issue Jul 27, 2020
* Resolves 9.6.2 logging issue.

Closes #3906

Apparently some files where deleted as part of #3843

This PR brings those files back and also fixes stylecop warnings. Some class names had to be changed both for clarity and to respect stylecop rule that the file name should match the class name. Because of that change, the dnn manifest was also changed so it all works with the new names.

* fixes one missed ref in manifest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants