Copied to clipboard

Flag this post as spam?

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


  • Jeroen Oostwouder 100 posts 296 karma points
    Feb 12, 2019 @ 13:26
    Jeroen Oostwouder
    0

    Could not retrieve media 0000 from Examine index

    Hi there, I'm currently having some trouble with a site we build in Umbraco 7.3.4.

    The logs are currently flooded with this message:

    Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache - Could not retrieve media 108450 from Examine index, reverting to looking up media via legacy library.GetMedia method
    

    *media ID changes for every line

    It has a lot of images in a specific folder within the Media section.

    So far, I've located the node which is using a certain mediaID (I pick one from the logfile). The media items is present on that content-node. It also exists within the Media section, and all files are in place.

    At this point, I'm out of idea's. The only thing I can think of, is a timeout occuring when the indexer is trying to retrieve media items. And therefore doesn't include these items in the index.

    What could cause this? Has anybody any idea?

  • Alex Skrypnyk 6131 posts 23950 karma points MVP 7x admin c-trib
    Feb 12, 2019 @ 14:15
    Alex Skrypnyk
    0

    Hi Jeroen

    Di you try to rebuild examine indexes? How do you render images? Can you show the code?

    Alex

  • Jeroen Oostwouder 100 posts 296 karma points
    Feb 12, 2019 @ 14:52
    Jeroen Oostwouder
    0

    Hi Alex,

    I've rebuild the indexes (even excluded the images in the indexes), but the logs keep filling up.

    I have some code here. It's from on of the pages which should get the images that are mentioned in the logfiles. (disclaimer: it's old, and made by an ex-colleague :D )

    @foreach (var imageId in images.Split(',')) {
        dynamic media = Umbraco.Media(imageId);
        <div>
            @if (media.DocumentTypeAlias == "HeaderImage") {
                <a href="@media.Url" rel="prettyPhoto[@Model.Content.Id]">
                    <img src="@media.GetCropUrl("Headercrop")" width="100%" alt="" />
                </a>
            }
            else {
                <a href="@media.umbracoFile" rel="prettyPhoto[@Model.Content.Id]">
                    <img class="galleryImage" src="@media.umbracoFile?mode=crop&width=@_imageWidth&height=@_imageHeight" title="@media.Name" />
                </a>
            }
            @if (media.HasValue("image_title") || media.HasValue("image_description")) {
                <div class="sliderTextHolder">
                    <div class="sliderText">
                        @if (media.HasValue("image_title")) {
                            <h4>@media.image_title</h4>
                        }
                        @if (media.HasValue("image_description")) {
                            <p>@media.image_description</p>
                        }
                    </div>
                </div>
            }
        </div>
    }
    
Please Sign in or register to post replies

Write your reply to:

Draft