Thanks Dennis for the welcome & the quick response!
I have updated the code already to work with the strongly typed values now being returned - using the extension methods above (sorry - I left those out of the original post, I have since updated it).
I think if it was a property issue, I wouldn't get a valid path in the output markup - I'd get a compilation error. Instead, I get a valid path, which then 404s if you open it in the browser directly (and no images output to the page)
Great that you got it to work. But if you are experience this again, then what I normally do is break the code down piece by piece to see when it goes wrong then you know what to focus on.
I wish it was fixed! The 404 issue remains, sadly.
The media URL is correctly written to the markup - but if you follow the link URL you get a 404 response. So something seems to be broken in Umbraco's mapping of media URLs, though I don't know how to track down where it has gone wrong.
I did eventually find the solution - the upgrade process had overwritten the /media/web.config file, removing the static file handler. I reverted the change so it now looks like this:
404 on media URLs after upgrade to 7.6
Hi,
I have recently upgraded a 7.5 project to 7.6, and fixed the various issues which arose from model properties now returning strongly typed values.
I'm now getting 404 errors on all the media library URLs, even though there is a valid media URL written out to the page.
We're using Azure BLOB storage & have the provider configured. I can see the images listed in the media library (and thumbnails load correctly).
For example in the razor script I'm using this:
Where MainImage is an IPublishedContent. This invokes the following extension methods:
In the page output I get this:
And the path is correct (used to work before the upgrade) - but now I get a 404.
Any idea how to go about tracking down the issue?
Thanks
Hi Adam and welcome to our.
Could you please try to navigate to /config/UmbracoSettings.config and have a look what the value of this is
It´s need to be set to false if you want to use the old media picker. Another solution would be to use this documentation
https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/Built-in-Property-Editors/Media-Picker2
Hope this helps,
/Dennis
Thanks Dennis for the welcome & the quick response!
I have updated the code already to work with the strongly typed values now being returned - using the extension methods above (sorry - I left those out of the original post, I have since updated it).
I think if it was a property issue, I wouldn't get a valid path in the output markup - I'd get a compilation error. Instead, I get a valid path, which then 404s if you open it in the browser directly (and no images output to the page)
Am I missing something obvious?
Hi There,
Great that you got it to work. But if you are experience this again, then what I normally do is break the code down piece by piece to see when it goes wrong then you know what to focus on.
But #H5YR for fixing this yourself.
All the best,
/Dennis
I wish it was fixed! The 404 issue remains, sadly.
The media URL is correctly written to the markup - but if you follow the link URL you get a 404 response. So something seems to be broken in Umbraco's mapping of media URLs, though I don't know how to track down where it has gone wrong.
Hi Booler.
Okay could you then add an issue to this issue tracker
http://issues.umbraco.org/issues/U4
So we can look more into this to see if it´s a problem
Best,
/Dennis
I did eventually find the solution - the upgrade process had overwritten the /media/web.config file, removing the static file handler. I reverted the change so it now looks like this:
And media URLs are now working again.
Hi Booler,
Great to hear that you managed to find the issue and get it to work agin #h5yr.
Have a fantastic Friday, and happy coding.
/Dennis
is working on a reply...