Open PhilMakower opened 4 months ago
Hi there @PhilMakower!
Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.
We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.
We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.
Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face:
The media item in question, as well as many others, are in a folder in the RECYCLE BIN of the Media Libarary! In v7 the media items show on the front end anyway (since the content has direct links to the files) In v13 the links have been migrated to locallinks. Presumably Umbraco "knows" not to link to Media items in the Recycle Bin! I guess one workaround is to find all the locallinks in the content to Media items in the Recycle Bin and move each out of the Recycle Bin.
Or maybe customise the published content cache to allow links to media items even if they are in the Recycle Bin?
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
13.0.3
Bug summary
I have migrated content from v7 to v13. At least one of the pages has a link to a PDF in the media section.
On the v7 site, the href is just "/media/2732/ds2178ra.pdf" On the migrated (v13) site, the href is "/{localLink:umb://media/f73925e0b1bc4b2daa99eef696d6eb36}" as above. On the v13 site, in Umbraco we can click the link then click the link button to get the sidebar. This correctly shows the link as "/media/2732/ds2178ra.pdf" (this file exists on the filesystem)
Om the v13 site, the razor template includes @Model.BodyText where BodyText is the RTE property (html string) The media href is blank. There is also an href "/{localLink:1080}" in the backend which renders correctly as "/products/" so the issue seems specific to media.
I have tried stopping the, deleting the DATA directory and restarting so it has to re-create the caches. I have tried the "Published Status" buttons in Umbraco so see if that fixes the error, no joy.
Specifics
I have written an extension RteString() to fetch the BodyText from the ExternalIndex, which has the link as above.
I have writen an extension EnsureInternalLinks() to turnt he links into actual URLs. Note that for MEDIA, I get the IMedia item from the media service, and the URL is just in the "umbracoFIle" property.
then in templates
Steps to reproduce
Add media link to content in RTE editor in Umbraco View page Newly created link shows OK using @Model.BodyText and custom Migrated link shows BLANK using @Model.BodyText but shows OK using @Html.Raw() on custom string created as above (it's as if the migrated media file in not "published" somehow? Though then it wouldn't be in the external index!)
Expected result / actual result
expect the output to include the HREF to the media item But the HREF is BLANK