-
-
Notifications
You must be signed in to change notification settings - Fork 773
Attempting to Email Admin Logs Returns 500 Error #5573
Copy link
Copy link
Closed
Labels
Description
Description of bug
The email function to send Admin Logs returns a 500 Error even if SMTP is configured and tested to be working.
Steps to reproduce
- Enable SMTB, test that it's working correctly
- Open Manage=> Admin Logs

- Select some log lines, click 'Email Selected', and attempt to send the email
=> Email fails to send with a server error.
Current behavior
When attempting to email admin logs, it fails with a server error.
Expected behavior
It should be possible to email admin logs.
Screenshots
(posted inline above)
Error information
{
"Message": "An error has occurred.",
"ExceptionMessage": "Cannot import nodes of type 'Document'.",
"ExceptionType": "System.InvalidOperationException",
"StackTrace": " at System.Xml.XmlDocument.ImportNodeInternal(XmlNode node, Boolean deep)\r\n at Dnn.PersonaBar.AdminLogs.Components.AdminLogsController.GetExceptions(IEnumerable`1 logIds) in C:\\DNN\\Dnn.Platform\\Dnn.AdminExperience\\Dnn.PersonaBar.Extensions\\Components\\AdminLogs\\AdminLogsController.cs:line 270\r\n at Dnn.PersonaBar.AdminLogs.Components.AdminLogsController.EmailLogItems(String subject, String fromEmailAddress, String toEmailAddress, String message, IEnumerable`1 logItemIds, String& error) in C:\\DNN\\Dnn.Platform\\Dnn.AdminExperience\\Dnn.PersonaBar.Extensions\\Components\\AdminLogs\\AdminLogsController.cs:line 224\r\n at Dnn.PersonaBar.AdminLogs.Services.AdminLogsController.EmailLogItems(EmailLogItemsRequest request) in C:\\DNN\\Dnn.Platform\\Dnn.AdminExperience\\Dnn.PersonaBar.Extensions\\Services\\AdminLogsController.cs:line 182"
}
Additional context
It fails at line 270 of AdminLogsController:
var objNode = objXml.ImportNode(xmlDoc, true);
should be:
var objNode = objXml.ImportNode(xmlDoc.DocumentElement, true);
I'll have a PR up to fix this shortly.
Affected version
- 10.00.00 alpha build
- 09.11.01 latest supported release
Occurs in at least 9.10 and 9.11, code hasn't been changed recently so will occur in any alpha builds too
Affected browser
Any
Reactions are currently unavailable
