Copied to clipboard

Flag this post as spam?

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


  • Jonny Irwin 91 posts 153 karma points
    Feb 17, 2016 @ 10:31
    Jonny Irwin
    0

    Umbraco.TypedMedia returning property values as empty string

    I have been trying to upgrade an umbraco site from 6.1.0 to 7.3.7. All has gone largely ok but I have come across an issue trying to display images.

    I have an image in the media section (id = 3763) as below: enter image description here

    The properties can be seen to be populated fine here and through the database in the CmsPropertyData table:

    enter image description here

    However, in my razor scripts when i use the following:

    var myImage = Umbraco.TypedMedia(3763);
    

    myImage will return the media item with the correct name, path etc. but all the property values such as umbracoFile are coming back as an empty string.

    Has anyone seen this before or knows what I should do about it?

    Thanks!!

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Feb 18, 2016 @ 11:53
    Jeroen Breuer
    1

    Hello,

    Umbraco stores media in Examine. Maybe something went wrong. Did you try to rebuild Examine?

    Jeroen

  • Jonny Irwin 91 posts 153 karma points
    Feb 18, 2016 @ 12:39
    Jonny Irwin
    0

    Thanks Jeroen!

    Can't believe I didn't know about media being stored in Examine.

    I rebuilt my Examine indexes but still not working.

    I have tracked down to further things though that may be of help. The XML Cache Data Integrity sass the content has an error (clicking Fix does not work).

    enter image description here

    Also my UmbracoTraceLog says:

    2016-02-17 10:30:02,400 [P9204/D2/T12] WARN Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache - Dropping property "resources_summary" because it does not belong to the content type.

    In Examine MAnagement I can see this "resources_summary" mentioned in my user fields, but to be honest, I have no idea what the resources_summary field is. enter image description here

  • Jonny Irwin 91 posts 153 karma points
    Feb 18, 2016 @ 14:48
    Jonny Irwin
    0

    This is now fixed. resources_summary was a custom examine user field added to index the old V6 related links control that I have since migrated to an Archetype control. Somehow having this field being indexed was breaking my media cache. Removing this user field from my examineindex.config has solved the issue.

    (I still have the issue with getting a cmsContentXml error in the admin site but I'm sure I can figure that out) - EDIT: no longer have this issue either - it was a case of somehow there being a published node in the recycle bin. Emptying the recycle bin sorted that.

Please Sign in or register to post replies

Write your reply to:

Draft