Copied to clipboard

Flag this post as spam?

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


  • Joshua Walsh 30 posts 151 karma points
    May 19, 2015 @ 07:36
    Joshua Walsh
    0

    I've somehow managed to get 2 umbracoFile uploads in a media item

    Hi guys,

    This is a weird issue, not quite sure how this has been managed.

    We've recently upgraded from Umbraco 4.7 to Umbraco 7.2.1. We noticed a few days ago that some of the PDFs on our website have reverted to older versions.

    We still have a copy of our 4.7 site running in order to help troubleshoot issues caused by the upgrade. On this site when, for example, we get Model.MediaById(16925).umbracoFile it gives us /media/16925/ourPDF-new.pdf. However on Umbraco 7 when we do Umbraco.Media(16925).umbracoFile it gives us /media/16925/ourPDF-old.pdf.

    If we visit /media/16925/ourPDF-new.pdf on either 4.7 or 7 we can download the new PDF, and if we put in /media/16925/ourPDF-old.pdf we can download the old PDF. So both PDFs are accessible on both environments, but umbracoFile for each environment returns a different value. (We have NOT modified these files since upgrading)

    It gets stranger though. In the Umbraco Backoffice of 4.7, if we click the link to the file next to the umbracoFile property it takes us to /media/16925/ourPDF-old.pdf. This behaviour is consistent in Umbraco 7.

    So to summarise, we have two files uploaded under the same Media node. One is newer than the other. In both Umbraco 4.7 and Umbraco 7 both files can be accessed from their respective URLs. In Umbraco 4.7 the older file is linked to in the backoffice while the newer file is linked to by the umbracoFile property. In Umbraco 7 the older file is linked to by both the backoffice and the umbracoFile property.

    Okay, great, so it seems that there was an inconsistency in Umbraco 4.7 which has been fixed in Umbraco 7. Unfortunately the file we wish to keep is the newer file, but Umbraco 7 is now consistently showing the older one. This isn't just an isolated media node either, it's happening to about a hundred of our media nodes. We can't easily tell which ones are affected, it's not consistent. We don't want to do each one manually, we'd like a way to fix it in bulk.

    Does anyone have any ideas on what I can do to troubleshoot and eventually fix this issue?

    Thanks,

    Josh

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 8x admin c-trib
    May 19, 2015 @ 08:13
    Chriztian Steinmeier
    0

    Hi Josh,

    Unfortunately I can't tell you what went wrong, but I know that it's important to alert the Core developers about issues like these - so have a quick look through the Issue Tracker to see if something similar has been logged; and if not, consider opening a new Issue.

    You could also have a peek at the actual source code and see if you can figure out why it could be doing what it does.

    /Chriztian

Please Sign in or register to post replies

Write your reply to:

Draft