Copied to clipboard

Flag this post as spam?

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


  • Roy van den Ekker 10 posts 80 karma points
    Dec 14, 2017 @ 13:59
    Roy van den Ekker
    0

    Unwanted change of link to media

    We are having problems with changing media links when replacing (re-uploading) an existing media file. Our marketeers use this URL in several HTML pages and other communication. They are used to only replacing the image, with the URL staying intact.

    Each uploads seems to create a new folder on the storage location (AzureFileSystemProvider/blob storage) and deleting the old one. This works fine in 7.5.13, now it looks "broken" in 7.7.6. Unfortunately that’s our upgrade path, so no versions in between.

    Before: enter image description here

    After: enter image description here

    (Note: the gap in the folder name is because of uploads of other images. If I would upload another one, folder would increase by 1)

    Umbraco CMS is used on a "master" on premise server, with two other Azure VM servers doing frontend work.

    Configuration files haven't been changes, unless instructed in the upgrade guides.

  • Søren Tidmand 107 posts 279 karma points
    Jan 08, 2018 @ 10:30
    Søren Tidmand
    1

    Hi Roy,

    It seems that Umbraco 7+ is handling upload of a new version of a media file (same name) differently than before 7 (probably until 7.5).

    In earlier versions of Umbraco Media section it was possible to "re-upload" a new version of a media file (with identical name) directly to the existing media node, but this has changed. Now you need to remove the original file to be able to upload the new ... AND now the new upload does NOT keep the old folder-ID, but instead Umbraco assigns a new folder and folder-ID.

    Since the original version of the media file is not being deleted from the server it will still be accessible.

    Example: Original link to media file /media/1040/documentation.pdf New link to media file after "re-upload" of the updated version with identical filename to the same media node /media/1134/documentation.pdf

    This can be a big issue if you're referring to a documentation pdf or image download with static links - and maybe even when using the media picker.

    I've reported the issue on a similar thread in Umbraco Issue Tracker.

    /Søren

  • Roy van den Ekker 10 posts 80 karma points
    Jan 08, 2018 @ 14:31
    Roy van den Ekker
    0

    Hi Søren,

    In my case the old media/image actually gets deleted from the Azure blob storage. In 7.7.6 you don't really need to delete the old, the "choose file" option is still there. I expect it to replace the existing version with keeping the URL intact. As it did before.

    Same problem when you use the media picker, as far as I know. Did see an issue where someone request to update all media links when replacing an image. Don't know how one would achieve that, but that's a different problem. We use the URL like you said, somewhere "hard coded" within a RTE or external web page.

  • Søren Tidmand 107 posts 279 karma points
    Jan 08, 2018 @ 16:00
    Søren Tidmand
    0

    Hi Roy,

    I totally agree with you that the re-uploaded file will need to overwrite and stay in the "old" folder, so that the URL is being kept intact.

    I believe that the issue in the Umbraco Issue Tracker is similar to your (and my) problem with relocating the media file, so please vote if you feel for it - http://issues.umbraco.org/issue/U4-10624 - let's cross fingers ;-)

    /Søren

  • Roy van den Ekker 10 posts 80 karma points
    Jan 11, 2018 @ 14:09
    Roy van den Ekker
    0

    I gues it might related to changed in MediaFileSystem, because of the guid thinks. Class is completely different compared with 7.5.13.

    https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/src/Umbraco.Core/IO/MediaFileSystem.cs#L140

    Though looking at that I don't see why it goes wrong in our case. Maybe related to external sources or settings we don't know about. Think it actually execute GetNextFolder while it shouldn't.

    GetMediaPath is called from: https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/src/Umbraco.Web/PropertyEditors/FileUploadPropertyValueEditor.cs Also cleanup happens over there.

  • Roy van den Ekker 10 posts 80 karma points
    Feb 05, 2018 @ 11:13
    Roy van den Ekker
    0

    I have more problems related to images, but don't know if this is related and haven't got a clue yet what's causing these problems.


    1) Clicking/selecting an image in a RTE, then click the Media Picker button in the toolbar. Error: " Server error: Contact administrator, see log for full details. Failed to retrieve data for media id undefined "

    2) RTE, insert new image by using the Media Picker button, hit upload. Uploading works fine, uploaded images gets selected. Hit submit. RTE is showing a broken image. HTML is


    What's causing this and the original problem in the topic start, don't know. Could it be related to some user rights? Misconfiguration? Though uploading works fine and old images get deleted. But all these three things are image related.

    I do have workarounds for now, but I don't want the problems to accumulate in the future.

  • Søren Tidmand 107 posts 279 karma points
    Feb 05, 2018 @ 12:30
    Søren Tidmand
    0

    Hi Roy,

    it sure sounds weird, but I can see some kind of possible explanation for 1) when trying to open an existing image that might have been updated and therefore have been assigned a new media ID which is not automatically updated in the database.

    /Søren

  • Roy van den Ekker 10 posts 80 karma points
    Feb 08, 2018 @ 09:38
    Roy van den Ekker
    0

    I changed the FileSystemProvider back to the default one, "Umbraco.Core.IO.PhysicalFileSystem, Umbraco.Core". Then it works, replacing the image keeps the same folder ID. When I change it back to "Our.Umbraco.FileSystemProviders.Azure.AzureBlobFileSystem, Our.Umbraco.FileSystemProviders.Azure" it is broken again, new folder ID for each replacement.

    So it is probably not an Umbraco problem but caused by the plugin. Though I have everything configured as instructed on https://github.com/JimBobSquarePants/UmbracoFileSystemProviders.Azure

    (yes, I also updated that NuGet package when updating Umbraco, as I do with more related packages)

  • James Jackson-South 459 posts 1653 karma points c-trib
    Feb 16, 2018 @ 11:15
    James Jackson-South
    0

    I would say the complete opposite.

    The plugin hasn't changed and used to work perfectly since it was implementing the expected behavior of the interface. It doesn't generate URLs, it simply works with the provided one.

    If Umbraco have changed the expected behaviour of the interface expectations and tweaked their own implementation to match then they have made a breaking change and it is up to them to fix it.

  • Roy van den Ekker 10 posts 80 karma points
    Feb 16, 2018 @ 11:47
    Roy van den Ekker
    0

    Thanks for taking a look. I also think it has to do something with Umbraco, not your plugin.

    See my follow up posts where I stated otherwise.

  • Søren Tidmand 107 posts 279 karma points
    Feb 08, 2018 @ 09:47
    Søren Tidmand
    0

    Very interesting point - and good to know.

  • Roy van den Ekker 10 posts 80 karma points
    Feb 08, 2018 @ 11:31
    Roy van den Ekker
    0

    Different test. Back to the old checkpoint. Umbraco 7.5.13.

    But only now upgraded UmbracoFileSystemProviders.Azure and dependencies. Guess what, image URL stayed intact as expected.

    Confused ... :)

    Edit: And upgraded it further more to U7.8, with dependencies, problem is back.

  • Roy van den Ekker 10 posts 80 karma points
    Feb 14, 2018 @ 13:56
    Roy van den Ekker
    0

    I was able to reproduce this with

    • Blank web project in Visual Studio
    • Install Umbraco 7.8.1 with NuGet, database SqlCE (now replacing images works fine, folder ID is kept as it initially was)
    • Install UmbracoFileSystemProviders.Azure 1.0.2 with NuGet and use configuration as installed with package (of course change configuration to use your own Azure blob storage) (now replacing images works incorrect, new folder ID gets generated with each replacement, old image on blob storage gets deleted)

    Downgrading UmbracoFileSystemProviders.Azure to 0.5.7-beta and WindowsAzure.Storage to 8.1.1, still same folder ID problem. Which are the version we are using with 7.5.13, were folder ID is kept as wanted.

    So in short, Umbraco 7.8.1 with default file system storage, no problems. 7.8.1 with Azure blob storage, folder ID problem.

    Edit: 7.5.14 works fine with latest UmbracoFileSystemProviders.Azure 1.0.2 and dependencies. 7.6.0 doesn't work fine with 1.0.2

Please Sign in or register to post replies

Write your reply to:

Draft