Copied to clipboard

Flag this post as spam?

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

  • Jack Lawry 23 posts 145 karma points c-trib
    Dec 09, 2019 @ 10:32
    Jack Lawry

    Media folder children issue (Seems to be an Examine issue)

    I have a v7 site with a lot of media (~150 GB) these are mainly images.

    A section of the site is a gallery, where the admin user process is:

    1. Make a folder in the media section
    2. Uploads all the images to this folder
    3. Creates a child node of the gallery node and this has a picker to choose the media folder and also a featured main image

    The gallery page shows the featured image and title but when clicked it is blank. If however I go into Developer > Examine Management > InternalIndexer > Index info & tools and click on the Rebuild index button to rebuild the index it shows again fine until either I deploy another code change or the site restarts for some reason?

    I can also replicate this consistently by deleting the \ExamineIndexes\Internal\Index folder from disk.

    To try and avoid this issue on deployment (as I purge the entire site root folder on deployment) this and the media folder is outside of the site root and has a virtual directory to link it back up to these persistent folders.

    The view for the gallery page is :

    <div class="gallery">
        @if (mediaFolder.Children.Any())
            foreach (var mediaItem in mediaFolder.Children)
                string mediaExtension = mediaItem.umbracoExtension;
                if (mediaExtension == "jpg" || mediaExtension == "png")
                    <a href="@mediaItem.Url" class="itemFixHeightWrapper" title="@mediaItem.Name">
                        <img src="@mediaItem.Url?width=747&height=499" class="img-responsive" alt="@mediaItem.Name" />
                    <!-- Item is a @(@mediaExtension == "" ? "Folder" : mediaExtension) -->
            <!-- NO CHILDREN IN MEDIA FOLDER -->

    It always returns <!-- NO CHILDREN IN MEDIA FOLDER --> if the Internal index is not rebuild.

    Is there a way to either trigger this rebuild process on startup or stop this issue happening?

    I am also not sure if this is similar to

Please Sign in or register to post replies

Write your reply to: