Copied to clipboard

Flag this post as spam?

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

  • AsheM 16 posts 107 karma points
    Jan 06, 2020 @ 15:07

    pictures/pages aren't loading correctly - examine indexes?

    So I applied a large series of updates bringing our test environment up from 7.5.x up to 7.15.3 and everything went great.

    Well we have our production side which I applied the same series of updates but now the pictures aren't loading properly and when the communities tries to load it throws a ysod.

    Here's where its crashing:

    if (Model.Content.HasValue("communities"))
        var communityListValue = Model.Content.GetPropertyValue<string>("communities");
        var communityList = communityListValue.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse);
        var communityCollection = Umbraco.TypedContent(communityList).Where(x => x != null);

    now on the test side the value of communityListValue is - "2513,2515" On the non-working production side it's pulling - "System.Collections.Generic.List`1[Umbraco.Core.Models.IPublishedContent]"

    I have a suspicion it's not indexing properly so I deleted the examine indexes(they had folders but were otherwise blank) and rebuilt them from the developer tab in back office and it did put files in there but they aren't the same as in the examine index in the test env. I don't know if they should be.

    Any advice would be appreciated.

  • Yakov Lebski 426 posts 1653 karma points
    Jan 06, 2020 @ 21:29
    Yakov Lebski

    after upgrade, Umbraco try to use converters to properties

    you can convert to new API by using

    if (Model.Content.HasValue("communities"))
        var communityCollection = Model.Content.GetPropertyValue<IEnumerable<IPublishedContent>>("communities");

    or disable Converters in UmbracoSetting.config - less preferred for me, but will work for big sites

Please Sign in or register to post replies

Write your reply to: