You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#101342 JCE Mediabox-PopUp absolute path instead of relative

Posted in ‘Mediabox’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by pixelhexe on Monday, 21 October 2019 16:07 BST

pixelhexe
JCE Pro 2.7.18 -
How to prevent this? Although I checked relative URLs in the Editor Parameter, the JCE MediaBox-Popups produce always absolute paths for the links (to image in this case, didn't test video or other).
It is ok in backend:
<a class="jcepopup noicon" href="https://www.joomlacontenteditor.net/images/...

but in frontend it is transformed to:
<a class="jcepopup noicon" href="https://...

Although it does not affect the functionality, for a specific reason I need relative paths here.

Any suggestions? Thanks!

Ryan
MediaBox does not convert any popup links to absolute. If you are seeing absolute links in the source code of the page, then those have been converted by another process (perhaps a SEF component?)

Please post a link to an example popup.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

pixelhexe
Thank you for the quick reply. Unfortunately I can't post a link, because it's password protected site in development. I tested it on remote and local development server. It really only occurs with JCE Mediabox PopUps - very strange. So I will have to investigate deeper, which plugin or component is responsible for this. In case of positive result I will let you know ...

pixelhexe
So I investigated a little deeper and the result is, that it is THE BROWSER which converts the links to absolute paths! This is really weird - as soon as the a tag comes with class "jcepopup" or with "data-mediabox-" attributes, the links are written with "https://..." (or http on local system). The source code itself is not converted - of course you were right, Ryan. Source code to test this:

<p><a href="https://www.joomlacontenteditor.net/images/relative-path-to-my-image.jpg">test</a></p>

<p><a class="jcepopup" href="https://www.joomlacontenteditor.net/images/relative-path-to-my-image.jpg" data-mediabox="1" data-mediabox-width="1000" data-mediabox-title="title"><img src="https://www.joomlacontenteditor.net/images//relative-path-to-my-image.jpg" alt="" />title</a></p>
In browser developer tool you can see the converted link (at least I can see it in my local and remote system, tested in Chrome and Firefox) of the jcepopup link (not the source path to the image, only the link path):

<p><a href="https://www.joomlacontenteditor.net/images/relative-path-to-my-image.jpg">test</a></p>

<p><a class="jcepopup" href="https://www.my-brand-new-website.com/images/relative-path-to-my-image.jpg" data-mediabox="1" data-mediabox-width="1000" data-mediabox-title="title"><img src="https://www.joomlacontenteditor.net/images/images/relative-path-to-my-image.jpg" alt="" />title</a></p>
Strange, isn't it? The reason for my concern is that I beautify extern links with font icons with CSS which makes no sense for the JCE popup links ...

Ryan
Please try JCE MediaBox 2.0.13 Beta 1 - https://www.joomlacontenteditor.net/downloads/mediabox/development

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

pixelhexe
Perfect, Ryan, thanks! This version fixes the issue. 🙂