Redirects by renaming nodes only work for first website on an instance with multiple websites
Hi,
We have an instance with multiple websites.
When we use the old property "urlTracker:hasDomainOnChildnode" we get 500's while loading the URLTracker overview.
Invalid URI: The format of the URI could not be determined.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UriFormatException: Invalid URI: The format of the URI could not be determined.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[UriFormatException: Invalid URI: The format of the URI could not be determined.]
System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) +8906374
InfoCaster.Umbraco.UrlTracker.Models.UrlTrackerModel.get_CalculatedOldUrlWithDomain() in c:\Temp\UrlTracker-master\UrlTracker-master\Models\UrlTrackerModel.cs:77
InfoCaster.Umbraco.UrlTracker.Models.UrlTrackerModel.get_CalculatedOldUrl() in c:\Temp\UrlTracker-master\UrlTracker-master\Models\UrlTrackerModel.cs:54
[TargetInvocationException: Property accessor 'CalculatedOldUrl' on object 'InfoCaster.Umbraco.UrlTracker.Models.UrlTrackerModel' threw the following exception:'Invalid URI: The format of the URI could not be determined.']
System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component) +8780063
System.Web.UI.WebControls.BoundField.TryGetSimplePropertyValue(Object dataItem, Object& data) +122
System.Web.UI.WebControls.BoundField.GetValue(Control controlContainer) +146
System.Web.UI.WebControls.BoundField.OnDataBindField(Object sender, EventArgs e) +71
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +304
System.Web.UI.Control.DataBindChildren() +12760215
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +321
System.Web.UI.WebControls.GridView.CreateRow(Int32 rowIndex, Int32 dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState, Boolean dataBind, Object dataItem, DataControlField[] fields, TableRowCollection rows, PagedDataSource pagedDataSource) +295
System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +4780
System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +95
System.Web.UI.WebControls.GridView.PerformDataBinding(IEnumerable data) +19
System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +222
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +313
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +146
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +192
System.Web.UI.Control.EnsureChildControls() +189
System.Web.UI.WebControls.GridView.get_Rows() +54
InfoCaster.Umbraco.UrlTracker.UI.UrlTrackerManager.OnPreRender(EventArgs e) in c:\Temp\UrlTracker-master\UrlTracker-master\UI\UrlTrackerManager.aspx.cs:150
System.Web.UI.Control.PreRenderRecursiveInternal() +113
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4297
Also, when we publish a node with this setting set to true we see the following errors in the logs:
System.UriFormatException: Invalid URI: The format of the URI could not be determined.
STACKTRACE
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at InfoCaster.Umbraco.UrlTracker.Repositories.UrlTrackerRepository.AddUrlMapping(IContent content, Int32 rootNodeId, String url, AutoTrackingTypes type, Boolean isChild) in c:\temp\UrlTracker-master\Repositories\UrlTrackerRepository.cs:line 52
at InfoCaster.Umbraco.UrlTracker.UrlTrackerApplicationEventHandler.ContentService_Publishing(IPublishingStrategy sender, PublishEventArgs`1 e) in c:\temp\UrlTracker-master\UrlTrackerApplicationEventHandler.cs:line 89
at Umbraco.Core.Publishing.PublishingStrategy.PublishInternal(IContent content, Int32 userId)
at Umbraco.Core.Services.ContentService.SaveAndPublishDo(IContent content, Int32 userId, Boolean raiseEvents)
at Umbraco.Web.Editors.ContentController.PostSave(ContentItemSave contentItem)
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()
When we leave this as is ("urlTracker:hasDomainOnChildnode" set property to false) The redirects only work on the first website in the content tree. No good work around though, setting it to false doesn't allow us to select a domain as root node (dropdownlist is gone) :(
Work around is to move the website you want to the top of the tree, and then rename the page you want. After moving the website to its former place, the redirect still works.
If the redirect was created when a website wasn't on top, and go to a page which URL Tracker should redirect, I get the following logging (1288 is the website node):
In short: redirects for page and ancestor renames are only created correctly when a website is on top of the content tree.
Manually created redirects always work.
Redirects by renaming nodes only work for first website on an instance with multiple websites
Hi,
We have an instance with multiple websites.
When we use the old property "urlTracker:hasDomainOnChildnode" we get 500's while loading the URLTracker overview.
Also, when we publish a node with this setting set to true we see the following errors in the logs:
When we leave this as is ("urlTracker:hasDomainOnChildnode" set property to false) The redirects only work on the first website in the content tree. No good work around though, setting it to false doesn't allow us to select a domain as root node (dropdownlist is gone) :(
Work around is to move the website you want to the top of the tree, and then rename the page you want. After moving the website to its former place, the redirect still works.
If the redirect was created when a website wasn't on top, and go to a page which URL Tracker should redirect, I get the following logging (1288 is the website node):
In short: redirects for page and ancestor renames are only created correctly when a website is on top of the content tree. Manually created redirects always work.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.