-
Is there an existing issue for this?
What happened?Firstly to give some context: I cannot recreate this problem. So far it has only happened on 1 upgraded site, where the portal/0 had been deleted and the website runs on portal/3 (I'm not sure this is the issue) I have looked at the code and the database tables, but cannot find any reason the pages in the personabar cannot be seen, the select of the admin pages works on the dropdowns. When the pages admin opens a 403 error is received from the DNN install, it's calling "/API/PersonaBar/Pages/GetPageList?searchKey=" The error seems to highlight this method: in PagesController.cs It seems to be the ConvertToPageItem() that causes the problem. (See error below) Of course, this may be data related, but I can't see what. Anyone with any ideas of what I should look for, please let me know. My initial thought is that it is the fact we have deleted portal/0 but I can't see any evidence to back that up. Tomorrow, I will try and find another website were the portal/0 is missing and try an upgrade on that, to see if it can be recreated. I'll also try the compile of DNN10 again and see if I can get it debugging. Please let me know if you have any ideas. Steps to reproduce?Cannot recreated Current BehaviorUnable to edit pages Expected BehaviorEdit pages. Relevant log outputAnything else?Here is the error when I call the url "//API/PersonaBar/Pages/GetPageList?searchKey=" from the browser. An error has occurred. The 'ObjectContent`1' type failed to serialize the response body for content type 'application/xml; charset=utf-8'. System.InvalidOperationException An error has occurred. Object reference not set to an instance of an object. System.NullReferenceException at Dnn.PersonaBar.Pages.Components.WorkflowHelper.GetTabWorkflowName(TabInfo tab) at Dnn.PersonaBar.Pages.Components.Converters.ConvertToPageItem[T](TabInfo tab, IEnumerable`1 portalTabs) at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext() at WriteArrayOfPageItemToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , CollectionDataContract ) at System.Runtime.Serialization.CollectionDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeAndVerifyType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, Boolean verifyKnownType, RuntimeTypeHandle declaredTypeHandle, Type declaredType) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithXsiTypeAtTopLevel(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle originalDeclaredTypeHandle, Type graphType) at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver) at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver) at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver) at System.Runtime.Serialization.DataContractSerializer.WriteObject(XmlWriter writer, Object graph) at System.Net.Http.Formatting.XmlMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, HttpContent content) at System.Net.Http.Formatting.XmlMediaTypeFormatter.WriteToStreamAsync(Type type, Object value, Stream writeStream, HttpContent content, TransportContext transportContext, CancellationToken cancellationToken) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Tracing.ITraceWriterExtensions.d__19.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.WebHost.HttpControllerHandler.d__22.MoveNext()Affected Versions10.1.0 (latest v10 release) What browsers are you seeing the problem on?Microsoft Edge Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 2 replies
-
|
Since we don't really have steps to recreate right now, I'll convert this to a discussion until we can pinpoint it... |
Beta Was this translation helpful? Give feedback.
-
|
so my first thought would be to try a clean install, create other portals then remove portal 0 and upgrade. If that makes it happen then we have our steps to recreate. If that does not make it happen, then maybe there is something in that page that cannot be serialized properly, maybe portal settings or such, so I would go digging in the database to try and stop things that may look weird on the Tabs and Portals tables. I see Workflows mentioned in there too, maybe an additional bug with localization upgrades that passed through the sieve of the last fixes in that area. I would check the tables that have "Workflow" in their names to see if there is anything different on them vs a site where it worked fine. |
Beta Was this translation helpful? Give feedback.
-
|
Sorry, I forgot to mention the first thing I tried was to create a fresh installation and remove portal/0 and the portal/1 worked. Hence I can't recreate. |
Beta Was this translation helpful? Give feedback.
-
|
OK, yes it's the workflow. The "DefaultTabWorkflowKey" value in the portalsettings table did not exist in the "ContentWorkflows" table. So this is a data issue, the question is, how did it happen? I'll do some test and try to recreate, if I can prove a bug, I'll create another issue. I'll close this discussion. Steps to fix. 2 - Check the portalsettings table. 3 - IF the "DefaultTabWorkflowKey" does not exist in the "[ContentWorkflows]" table, update it to match the correct workflow ID. NOTE: The above is an example using number 16 ID. Thank you for your help Daniel. Although it was obvious and I should have checked this, I need a fresh pair of eye to point it out. Thank you. |
Beta Was this translation helpful? Give feedback.
-
|
Steps to fix. 2 - Check the portalsettings table. 3 - IF the "DefaultTabWorkflowKey" does not exist in the "[ContentWorkflows]" table, update it to match the correct workflow ID. NOTE: The above is an example using number 16 ID. |
Beta Was this translation helpful? Give feedback.
-
|
This has happened again with an upgrade. With a installation using only portal/0. So I think there is a problem with the workflowid being changed, or with invalid data before now being a problem. I'll get the recreation steps and log an issue. |
Beta Was this translation helpful? Give feedback.
Steps to fix.
1 - check the "ContentWorkflows" table.
2 - Check the portalsettings table.
3 - IF the "DefaultTabWorkflowKey" does not exist in the "[ContentWorkflows]" table, update it to match the correct workflow ID.
NOTE: The above is an example using number 16 ID.