Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dan Evans 616 posts 988 karma points
    Jul 31, 2013 @ 15:17
    Dan Evans
    0

    Error in dashboard on upgrade from V1 to V2

    I just upgraded a U 4.11.6 install to the latest version of URL Tracker. It migrated the old data OK but getting this error when trying to view the dashboard:

    [NullReferenceException: Object reference not set to an instance of an object.]
       InfoCaster.Umbraco.UrlTracker.Helpers.UrlTrackerHelper.ResolveUmbracoUrl(String url) in c:\Users\kipusoep\Documents\GitHub\UrlTracker\UrlTracker\Helpers\UrlTrackerHelper.cs:30
       InfoCaster.Umbraco.UrlTracker.Models.UrlTrackerModel.get_CalculatedOldUrlWithDomain() in c:\Users\kipusoep\Documents\GitHub\UrlTracker\UrlTracker\Models\UrlTrackerModel.cs:70
       InfoCaster.Umbraco.UrlTracker.Models.UrlTrackerModel.get_CalculatedOldUrl() in c:\Users\kipusoep\Documents\GitHub\UrlTracker\UrlTracker\Models\UrlTrackerModel.cs:51
    
    [TargetInvocationException: Property accessor 'CalculatedOldUrl' on object 'InfoCaster.Umbraco.UrlTracker.Models.UrlTrackerModel' threw the following exception:'Object reference not set to an instance of an object.']
       System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component) +387
       System.Web.UI.WebControls.BoundField.TryGetSimplePropertyValue(Object dataItem, Object& data) +89
       System.Web.UI.WebControls.BoundField.GetValue(Control controlContainer) +209
       System.Web.UI.WebControls.BoundField.OnDataBindField(Object sender, EventArgs e) +58
       System.Web.UI.Control.OnDataBinding(EventArgs e) +92
       System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +85
       System.Web.UI.Control.DataBind() +15
       System.Web.UI.Control.DataBindChildren() +187
       System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +94
       System.Web.UI.Control.DataBind() +15
       System.Web.UI.WebControls.GridView.CreateRow(Int32 rowIndex, Int32 dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState, Boolean dataBind, Object dataItem, DataControlField[] fields, TableRowCollection rows, PagedDataSource pagedDataSource) +167
       System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +3724
       System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +67
       System.Web.UI.WebControls.GridView.PerformDataBinding(IEnumerable data) +14
       System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +123
       System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +33
       System.Web.UI.WebControls.DataBoundControl.PerformSelect() +138
       System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +30
       System.Web.UI.WebControls.GridView.DataBind() +4
       System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +105
       System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +75
       System.Web.UI.Control.EnsureChildControls() +83
       System.Web.UI.WebControls.GridView.get_Rows() +34
       InfoCaster.Umbraco.UrlTracker.UI.UrlTrackerManager.OnPreRender(EventArgs e) in c:\Users\kipusoep\Documents\GitHub\UrlTracker\UrlTracker\UI\UrlTrackerManager.aspx.cs:89
       System.Web.UI.Control.PreRenderRecursiveInternal() +83
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974
  • Stefan Kip 1606 posts 4098 karma points c-trib
    Jul 31, 2013 @ 15:20
    Stefan Kip
    100

    Could you have a look in the DB table (icUrlTracker) and find any entries with the columns OldUrl and OldRegex empty? E.g. the following SQL statement:

    SELECT * FROM icUrlTracker WHERE OldUrl = '' and OldRegex = ''
    
  • Dan Evans 616 posts 988 karma points
    Jul 31, 2013 @ 15:29
    Dan Evans
    0

    There are none but there are 4 where Old Url was NULL. I deleted these 4 rows and now it's working.

    Thanks for the super prompt response!

    Dan

  • Stefan Kip 1606 posts 4098 karma points c-trib
    Jul 31, 2013 @ 15:30
    Stefan Kip
    0

    Ah ofcourse, NULL ;-) I've added an exception in the UrlTrackerModel to notify the developer about this in the future:

    if (string.IsNullOrEmpty(OldRegex) && string.IsNullOrEmpty(OldUrl))
        throw new InvalidOperationException("Both OldRegex and OldUrl are empty, which is invalid. Please correct this by removing any entries where the OldUrl and OldRegex columns are empty.");
    
  • 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.

Please Sign in or register to post replies