Media href not working after upgrade (updated title)
Hi,
we recently upgraded Umbraco from version 8 to version 12 (currently on 12.3.1).
At the same time we started using Azure Blob-storage.
Apparently everything worked after the upgrade/move.
But now we noticed that
no media picker links are working in RTE (you can select the image/file and save but it's not working frontend, just gives empty href)
a hard-copied link to a media file works in RTE
images uploaded after the upgrade/move are not shown ("Missing image")
images uploaded before the upgrade/move are shown
I'm guessing it has more to do with Azure Blob-storage than the upgrade but I don't know what the problem is. There are no errors logged.
Does anybody know what the problem could be?
Update to question 09-11-2023:
I made a test page and looked at the code:
Both a preexisting image and a newly uploaded image have data-udi with values like "umb://media/9f642aecbe024ea083308bc56888d98e", but only the old image is shown when viewing the page.
A link to a PDF-file has href "/{localLink:umb://media/005109bfebd94b3386271b3894c51a8c}". In the view the href is "". (Doesn't matter old or newly uploaded media file).
A hard coded href to the same media file e.g. "/media/u2efcagz/xyz.pdf" works.
I'm still no closer to figuring out the problem.
Update to question 11-11-2023:
It seems that newly uploaded images can be found and viewed correctly, but as soon as a restart or modelsbuilder's refresh happens the links to the files are lost on viewing.
Can it be something with the cache? It's hosted on Azure Apps.
It seems to happen when you save the page and the udi is translated to the actual href.
Update to question 12-11-2023:
Example with three PDF's:
All three open correct in the Media-dashboard (backend).
If I make a link using the media picker, I get the following when viewing:
PDF 1: Works - no matter what
PDF 2: Doesn't work, but pressing "Save" on the Media object, makes it work. Until I restart the server. Then the href is gone. Pressing "Save" makes it work again and so on ...
PDF 3: Doesn't work - no mater what
I cannot see anything special about the PDF's.
New update:
If I upload a PDF to a level 1 location (mediaroot > folder) and use media picker - it makes the correct href.
If I take the same PDF and upload it to a level 4 or above location (mediaroot > folder > subfolder > subfolder > subfolder) it doesn't make the correct href.
Again an update:
It's very strange.
When a media file has e.g. level 6 and path -1,8439,8440,8441,8442,8444,8443 it fails to get a href, but moving the image in the media section so it has level 3 and path -1,8439,8440,8443 makes it render correctly in the view.
Apart from the first path as a number will be an overflow, I fail to see why it doesn't work.
Media href not working after upgrade (updated title)
Hi,
we recently upgraded Umbraco from version 8 to version 12 (currently on 12.3.1). At the same time we started using Azure Blob-storage.
Apparently everything worked after the upgrade/move.
But now we noticed that
no media picker links are working in RTE (you can select the image/file and save but it's not working frontend, just gives empty href)
a hard-copied link to a media file works in RTE
images uploaded after the upgrade/move are not shown ("Missing image")
images uploaded before the upgrade/move are shown
I'm guessing it has more to do with Azure Blob-storage than the upgrade but I don't know what the problem is. There are no errors logged.
Does anybody know what the problem could be?
Update to question 09-11-2023:
I made a test page and looked at the code:
Both a preexisting image and a newly uploaded image have data-udi with values like "umb://media/9f642aecbe024ea083308bc56888d98e", but only the old image is shown when viewing the page.
A link to a PDF-file has href "/{localLink:umb://media/005109bfebd94b3386271b3894c51a8c}". In the view the href is "". (Doesn't matter old or newly uploaded media file).
A hard coded href to the same media file e.g. "/media/u2efcagz/xyz.pdf" works.
I'm still no closer to figuring out the problem.
Update to question 11-11-2023:
It seems that newly uploaded images can be found and viewed correctly, but as soon as a restart or modelsbuilder's refresh happens the links to the files are lost on viewing.
Can it be something with the cache? It's hosted on Azure Apps.
It seems to happen when you save the page and the udi is translated to the actual href.
Update to question 12-11-2023:
Example with three PDF's:
All three open correct in the Media-dashboard (backend).
If I make a link using the media picker, I get the following when viewing:
PDF 1: Works - no matter what
PDF 2: Doesn't work, but pressing "Save" on the Media object, makes it work. Until I restart the server. Then the href is gone. Pressing "Save" makes it work again and so on ...
PDF 3: Doesn't work - no mater what
I cannot see anything special about the PDF's.
New update:
If I upload a PDF to a level 1 location (mediaroot > folder) and use media picker - it makes the correct href.
If I take the same PDF and upload it to a level 4 or above location (mediaroot > folder > subfolder > subfolder > subfolder) it doesn't make the correct href.
Again an update:
It's very strange.
When a media file has e.g. level 6 and path -1,8439,8440,8441,8442,8444,8443 it fails to get a href, but moving the image in the media section so it has level 3 and path -1,8439,8440,8443 makes it render correctly in the view.
Apart from the first path as a number will be an overflow, I fail to see why it doesn't work.
Can someone give me a hint?
Found out it's this error https://github.com/umbraco/Umbraco-CMS/issues/15195
is working on a reply...