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 14 posts 84 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 129 posts 366 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 14 posts 84 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 129 posts 366 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 14 posts 84 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 14 posts 84 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 129 posts 366 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 14 posts 84 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 489 posts 1747 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 14 posts 84 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 129 posts 366 karma points
    Feb 08, 2018 @ 09:47
    Søren Tidmand
    0

    Very interesting point - and good to know.

  • Roy van den Ekker 14 posts 84 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 14 posts 84 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

  • John Oxenbridge 3 posts 74 karma points
    May 22, 2018 @ 06:42
    John Oxenbridge
    0

    Hi,

    I can confirm that the issue is still present with Umbraco v7.9.5 and v7.10.4 running against UmbracoFileSystemProviders.Azure 1.0.2.

    When updating a media file:

    • With the basic "Umbraco.Core.IO.PhysicalFileSystem", the new version of the media file is uploaded to the existing media folder (this is the expected behaviour)
    • With the "Our.Umbraco.FileSystemProviders.Azure.AzureBlobFileSystem", the new version of the media file is uploaded to a new media/[nnnn] folder, meaning that existing links do not target the updated file

    I don't know enough about the platform to know whether it is more appropriate for HQ to amend Umbraco, or the excellent developers of UmbracoFileSystemProviders.Azure to amend their solution, but as this package is heavily plugged in the Umbraco site as the means by which the Azure platform can be properly leveraged in an auto-scaling environment, could this please be investigated as soon as possible and an agreement reached as to how it can be addressed.

    Many thanks.

  • Chris Dixon 12 posts 55 karma points
    Nov 13, 2018 @ 17:43
    Chris Dixon
    0

    Hi all,

    Does anyone happen to know whether this has been fixed in v7.12?

    7.12.2 contained a fix to a related issue where a new file name wasn't changing the url (so this problem in reverse) :

    https://issues.umbraco.org/issue/U4-11587

    Thanks,

    Chris

  • Roy van den Ekker 14 posts 84 karma points
    Nov 15, 2018 @ 07:14
    Roy van den Ekker
    0

    Looking at the plugin's repository, the developer is working on a fix. But it's not available as a NuGet package yet, only as an alpha. Looks like a working solution, made a similar fix myself a while ago.

    So get the alpha or compile it yourself.

    --

    Edit: 1.0.3 is available so you guys might want to try that one.

Please Sign in or register to post replies

Write your reply to:

Draft