Copied to clipboard

Flag this post as spam?

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


  • Jeroen Mink 12 posts 51 karma points
    Jun 20, 2013 @ 09:59
    Jeroen Mink
    0

    Got error while going to dashboard in content section

    I got this stacktrace when i went to the content section's dasbhoard tab after upgrading from 1.5.1 to 2.0 beta:

    [InvalidOperationException: Sequence contains more than one matching element]
       System.Linq.Enumerable.SingleOrDefault(IEnumerable`1 source, Func`2 predicate) +4472500
       InfoCaster.Umbraco.UrlTracker.Models.UrlTrackerModel.get_CalculatedOldUrlWithDomain() +239
       InfoCaster.Umbraco.UrlTracker.Models.UrlTrackerModel.get_CalculatedOldUrl() +17
    
    [TargetInvocationException: Property accessor 'CalculatedOldUrl' on object 'InfoCaster.Umbraco.UrlTracker.Models.UrlTrackerModel' threw the following exception:'Sequence contains more than one matching element']
       System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component) +7836141
       System.Web.UI.WebControls.BoundField.GetValue(Control controlContainer) +278
       System.Web.UI.WebControls.BoundField.OnDataBindField(Object sender, EventArgs e) +72
       System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +304
       System.Web.UI.Control.DataBindChildren() +11424823
       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) +287
       System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +4604
       System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +94
       System.Web.UI.WebControls.GridView.PerformDataBinding(IEnumerable data) +18
       System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +182
       System.Web.UI.WebControls.DataBoundControl.PerformSelect() +274
       System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +105
       System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +170
       System.Web.UI.Control.EnsureChildControls() +182
       System.Web.UI.WebControls.GridView.get_Rows() +54
       InfoCaster.Umbraco.UrlTracker.UI.UrlTrackerManager.OnPreRender(EventArgs e) +385
       System.Web.UI.Control.PreRenderRecursiveInternal() +113
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4201

    After debugging the code i found that in UrlTrackerModels, CalculateOldUrlWithDomain the call 

    domain = domains.SingleOrDefault(x => x.NodeId == redirectRootNode.Id);

    Should be replaced with 

    domain = domains.FirstOrDefault(x => x.NodeId == redirectRootNode.Id);

    Since we're running with multiple domains on the site-node this was causing the exception

  • Stefan Kip 1606 posts 4098 karma points c-trib
    Jun 20, 2013 @ 10:01
    Stefan Kip
    0

    Thanks for reporting Jeroen!

    I didn't take multiple hostnames per node into account and will upload a fixed version within one or two hour(s) :-)

  • Jeroen Mink 12 posts 51 karma points
    Jun 20, 2013 @ 10:07
    Jeroen Mink
    0

    Hm when trying to edit a entry i get a similar error. The POST of the updatepanel responds

    with 48|error|500|Sequence contains more than one matching element|

    Did a quick peek in the source to find the source of it but couldn't find it

  • Stefan Kip 1606 posts 4098 karma points c-trib
    Jun 20, 2013 @ 10:09
    Stefan Kip
    0

    Well yes the same sort of code is used in multiple locations, including the edit views.

  • Stefan Kip 1606 posts 4098 karma points c-trib
    Jun 20, 2013 @ 10:59
    Stefan Kip
    0

    v2.0.1-beta should fix this, can you confirm?

  • Jeroen Mink 12 posts 51 karma points
    Jun 20, 2013 @ 11:11
    Jeroen Mink
    0

    No i'm getting a different exception in the dashboard now:

    [FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.]
       System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args) +14350248
       System.String.Format(IFormatProvider provider, String format, Object[] args) +136
       InfoCaster.Umbraco.UrlTracker.Models.UrlTrackerDomain.get_UrlWithDomain() +278
       InfoCaster.Umbraco.UrlTracker.Models.UrlTrackerModel.get_CalculatedOldUrlWithDomain() +395
       InfoCaster.Umbraco.UrlTracker.Models.UrlTrackerModel.get_CalculatedOldUrl() +17
    
    [TargetInvocationException: Property accessor 'CalculatedOldUrl' on object 'InfoCaster.Umbraco.UrlTracker.Models.UrlTrackerModel' threw the following exception:'Index (zero based) must be greater than or equal to zero and less than the size of the argument list.']
       System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component) +8829651
       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() +12659735
       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) +385
       System.Web.UI.Control.PreRenderRecursiveInternal() +113
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4297
  • Stefan Kip 1606 posts 4098 karma points c-trib
    Jun 20, 2013 @ 11:27
    Stefan Kip
    100

    #H5IS

    v2.0.2-beta should fix this :P

  • Jeroen Mink 12 posts 51 karma points
    Jun 20, 2013 @ 11:46
    Jeroen Mink
    0

    Yep, that does the trick!

  • Stefan Kip 1606 posts 4098 karma points c-trib
    Jun 20, 2013 @ 11:47
    Stefan Kip
    0

    Awesome, can you mark this thread resolved? :-)

  • 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