Exception when opening contentEditor from custom dashboard (mntps with xpath startnode inside node)
Simply said: I made a simple dashboard to show some nodes in a table view. There's a button in each row for editing that node. The button uses the following function to open an editor:
function showOrderDetails(id, name) {
var options = {
id: id
};
editorService.contentEditor(options);
}
This works fine, except for the mntp-properties of the node. Inside these mntps there is a Xpath expression to get startnode:
But this causes an exception (in the background) because $current is not available:
Possibly unhandled rejection: {"errorMsg":"Failed to retrieve entity data for query $current/ancestor-or-self::shop/descendant-or-self::shopSettings/countries","data":{"Message":"The request is invalid.","MessageDetail":"The parameters dictionary contains a null entry for parameter 'nodeContextId' of non-nullable type 'System.Int32' for method 'Umbraco.Web.Models.ContentEditing.EntityBasic GetByQuery(System.String, Int32, Umbraco.Web.Models.ContentEditing.UmbracoEntityTypes)' in 'Umbraco.Web.Editors.EntityController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter."},"status":400}
As you can see nodeContextId=undefined seems to be going wrong here...
So, when editing the node from the content tree (the regular way) it works fine with mntps with xpath for startnode, but when using editor.contentEditor inside the custom dashboard plugin it doesn't.. Is this a bug? Or does anyone know what I should do to fix this? Any help would be really appreciated.
No unfortunately I didn't.. Nowadays you won't get much replys over here. So when dealing with these kinds of bugs you have to dive into the core code to find out whats going wrong.
In this case I didn't have the time to do that. Hopefully you get lucky solving this one ;-)
I had the same problem on the "content" section, but only in one MNTP (I have several MNTPS that use XPATH),
So I rebuild the database cache, and the error is gone.
I guess something was missing when it tried to pull the relevant items from the cache.
Hope that it'll help...
Exception when opening contentEditor from custom dashboard (mntps with xpath startnode inside node)
Simply said: I made a simple dashboard to show some nodes in a table view. There's a button in each row for editing that node. The button uses the following function to open an editor:
This works fine, except for the mntp-properties of the node. Inside these mntps there is a Xpath expression to get startnode:
But this causes an exception (in the background) because $current is not available:
The url that is causing the 400 error is:
As you can see nodeContextId=undefined seems to be going wrong here...
So, when editing the node from the content tree (the regular way) it works fine with mntps with xpath for startnode, but when using editor.contentEditor inside the custom dashboard plugin it doesn't.. Is this a bug? Or does anyone know what I should do to fix this? Any help would be really appreciated.
Did you find an solution for this ? :)
Hi Thomas,
Did you find a solution for this ?
Thank you
No unfortunately I didn't.. Nowadays you won't get much replys over here. So when dealing with these kinds of bugs you have to dive into the core code to find out whats going wrong.
In this case I didn't have the time to do that. Hopefully you get lucky solving this one ;-)
I had the same problem on the "content" section, but only in one MNTP (I have several MNTPS that use XPATH), So I rebuild the database cache, and the error is gone. I guess something was missing when it tried to pull the relevant items from the cache. Hope that it'll help...
is working on a reply...