We have moved to GitHub Issues
Created by Brian Powell 03 Oct 2017, 18:29:28 Updated by Sebastiaan Janssen 12 Jul 2018, 10:37:44Tags: PR
Relates to: U4-4732
I'm trying to create a hyperlink in my webpage to an uploaded media file. In the RTE, if I go to Hyperlink -> Select Media, I can drill down to the media folder that contains the item I want to click to. When I click the Submit button, the URL of the file I selected populates the Link box and if I click Submit again, the link gets created.
In 7.7+, I can search all folders for media. If I search for a file and then choose one of the resulting files, it's URL does not populate the Link textbox. The link is never created. This needs fixed so the link URL is grabbed whether you're searching for a media file or manually browsing for it.
Same issue on 7.6.8. When browsing for a media item all goes well but when searching in the dialog for the media item the link displays "Url" instead of the real url. Not only in RTE but also in contentpickers.
I have exactly the same problem in version 7.7.2 and 7.6.2
It's due to that the searchMedia function only adds umbracoHeight and umbracoWidth ([SEE HERE|https://github.com/umbraco/Umbraco-CMS/blob/e333f6c6280b6221b777c22a0ed80995608e3ffd/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.controller.js#L324])
If you follow the breadcrumbs back out to the return function of the linkpicker dialog you can see what it want's to do:
$scope.model.target.url = mediaHelper.resolveFile(media);
And if you check out the
mediaHelper.resolveFile function it tries to get the path to use from any registered
The only two I found in the code is:
But since the
searchMedia doesn't give a crap about mapping up these two properties no URL is returned.
U4-9793 U4-10153 U4-10042
Yep, and related issue, sometimes when you start to type a search term in the media box, it very briefly shows the item you were seeking, then that item (and search term) disappear and you have to enter it a second time. But still, once you select the item you were searching for, doesn't complete the Link URL field.
This issue still persists in 7.10.0.
Haven't looked into why/how, but my PR for restoring anchors in the linkpicker seems to have fixed this too.
My changes include fetching the URL using contentResource.getById() rather than .getNiceUrl() as I needed access to other properties, so this might have been the fix.
Backwards Compatible: True
Fix Submitted: Pull request
Affected versions: 7.7.1, 7.6.8, 7.7.2, 7.7.7, 7.10.0, 7.9.2, 7.10.4
Due in version: 7.12.0