Fixes: U4-4427 Exception with selecting content start node in Multi-node tree picker 6.2.0
This commit is contained in:
@@ -21,10 +21,14 @@ namespace umbraco.dialogs
|
||||
TreeParams = TreeRequestParams.FromQueryStrings().CreateTreeService();
|
||||
DataBind();
|
||||
|
||||
if(Request.QueryString["selected"] != null && TreeParams.TreeType == "content") {
|
||||
if(Request.QueryString["selected"] != null && TreeParams.TreeType == "content")
|
||||
{
|
||||
var currContent = Services.ContentService.GetById(int.Parse(Request.QueryString["selected"]));
|
||||
if (currContent.ParentId > 0)
|
||||
DialogTree.SelectedNodePath = currContent.Path;
|
||||
if (currContent != null)
|
||||
{
|
||||
if (currContent.ParentId > 0)
|
||||
DialogTree.SelectedNodePath = currContent.Path;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@ namespace umbraco.uicontrols.TreePicker
|
||||
{
|
||||
get
|
||||
{
|
||||
if (HttpContext.Current != null && HttpContext.Current.Request.QueryString["id"] != null)
|
||||
if ( Context.Request.QueryString["id"] != null)
|
||||
{
|
||||
return TreeUrlGenerator.GetPickerUrl(Constants.Applications.Content, "content") + "&selected=" + HttpContext.Current.Request.QueryString["id"];
|
||||
return TreeUrlGenerator.GetPickerUrl(Constants.Applications.Content, "content") + "&selected=" + Context.Request.QueryString["id"];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,15 +22,15 @@ namespace umbraco.editorControls
|
||||
{
|
||||
|
||||
public pagePicker() : base() { }
|
||||
public pagePicker(interfaces.IData data) : base(data) { }
|
||||
public pagePicker(IData data) : base(data) { }
|
||||
|
||||
public override string TreePickerUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
if (HttpContext.Current != null && HttpContext.Current.Request.QueryString["id"] != null)
|
||||
if (Context.Request.QueryString["id"] != null)
|
||||
{
|
||||
return TreeUrlGenerator.GetPickerUrl(Umbraco.Core.Constants.Applications.Content, "content") + "&selected=" + HttpContext.Current.Request.QueryString["id"];
|
||||
return TreeUrlGenerator.GetPickerUrl(Umbraco.Core.Constants.Applications.Content, "content") + "&selected=" + Context.Request.QueryString["id"];
|
||||
}
|
||||
|
||||
return TreeUrlGenerator.GetPickerUrl(Umbraco.Core.Constants.Applications.Content, "content");
|
||||
|
||||
Reference in New Issue
Block a user