Skip to content

ArgumentOutOfRangeException in TableValueConverter #28

@hfloyd

Description

@hfloyd

I am using Limbo Models Builder for model generation. In the generated model file, the property value converter is called:

=> this.Value<global::Limbo.Umbraco.Tables.Models.TableModel>("ReturnsCalendarYear");

but it is failing:

ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
System.Collections.Generic.List<T>.get_Item(int index)
Limbo.Umbraco.Tables.Models.TableModel.ParseCellRow(int index, JArray array, TablesHtmlParser htmlParser, bool preview)
Limbo.Umbraco.Tables.Models.TableModel+<>c__DisplayClass18_0.<.ctor>b__2(int i, JArray x)
Limbo.Umbraco.Tables.Models.TablesDataExtensions.ForEach<TResult>(JArray array, Func<int, JArray, TResult> callback)
Limbo.Umbraco.Tables.Models.TableModel..ctor(JObject json, TableConfiguration config, TablesHtmlParser htmlParser, bool preview)
Limbo.Umbraco.Tables.Models.TableModel.Parse(JObject json, TableConfiguration config, TablesHtmlParser htmlParser, bool preview)
Limbo.Umbraco.Tables.PropertyEditors.TableValueConverter.ConvertIntermediateToObject(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object inter, bool preview)
Umbraco.Cms.Core.Models.PublishedContent.PublishedPropertyType.ConvertInterToObject(IPublishedElement owner, PropertyCacheLevel referenceCacheLevel, object inter, bool preview)
Umbraco.Cms.Infrastructure.PublishedCache.Property.GetValue(string culture, string segment)
Umbraco.Extensions.PublishedPropertyExtension.Value<T>(IPublishedProperty property, IPublishedValueFallback publishedValueFallback, string culture, string segment, Fallback fallback, T defaultValue)
Umbraco.Extensions.PublishedContentExtensions.Value<T>(IPublishedContent content, IPublishedValueFallback publishedValueFallback, string alias, string culture, string segment, Fallback fallback, T defaultValue)
Umbraco.Extensions.FriendlyPublishedContentExtensions.Value<T>(IPublishedContent content, string alias, string culture, string segment, Fallback fallback, T defaultValue)

Limbo.Umbraco.Tables Version 1.1.3

Stepping through the code, it appears the issue is here:
image

Rows has a count of zero.

Rows is supposed to be populated here:
image
but doesn't find anything.

This site is an upgrade form Umbraco 7, and the prior Table editor property type. The back-office display of the data works fine, so I assumed that the data model hadn't changed... but I will need to look closer, I guess.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions