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.

#101752 How not to strip full URLs to own site

Posted in ‘Editor’
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 Ryan on Thursday, 21 November 2019 12:56 GMT

perskram
How can I make the JCE PRO editor NOT strip full URLs to our own site?
A link to mysite.com/halleluja/ ends up as /halleluja/
When setting up mail to user in our form, I need to be able to link to our subpages.
Please advise.

Ryan
If you need absolute urls for a specific extension, like a newsletter or email extension, then it is generally a good idea to create a new editor profile specifically for this extension, and then set the Relative URLs option to No for this profile only.

To do this:
  1. Go to Components -> JCE Editor Profiles.
  2. Select the "Default" profile, or your main profile, and click the Copy button.
  3. Click on the name of the new profile to edit it, then in the Setup tab, give the profile a new Name and Description, set Enabled to Yes, and set the Ordering to Order First.
    https://cdn.joomlacontenteditor.net/tmp/newsletter-profile-ordering.jpg
  4. In the Assignment section, set Components to Select from List and then select the component to assign the profile to, eg: AcyMailing.
    https://cdn.joomlacontenteditor.net/tmp/newsletter-profile-assignment.jpg
  5. Click on the Editor Profiles tab, then set the Relative URLs option to No.
    https://cdn.joomlacontenteditor.net/tmp/newsletter-profile-relative.jpg
  6. Set any other profiles options as required, then click the Save button.


Now, when you create or editi an item in your mailing/newsletter extension, you will be using this new profile, with all URLs set to absolute.

Ryan Demmer

Lead Developer / CEO / CTO

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

perskram
Thanks Ryan, for this excellent reply. However, setting relative urls to NO makes internal links created by choosing a Main Menu Item "ugly":
So instead of
https://myspectacularsite.com/about/myname
the link goes to
https://myspectacularsite.com/administrator/index.php?option=com_content&view=article&layout=edit&id=242
So I am looking for another way. Internal linking is important to me.

Ryan
JCE always inserts links using the raw form, eg: https://myspectacularsite.com/administrator/index.php?option=com_content&view=article&layout=edit&id=242

The Joomla SEF plugin processes these links when the content is displayed in the front-end, converting the raw url into a SEF url.

I am of the opinion that the newsletter / mailing extension should be doing both the absolute URL conversion and SEF URL processing itself, when the email is sent, but none of them do, hence the need for the workaround I posted above.

I have added an option in JCE Pro 2.8.1 to convert the links to SEF urls too. You can set this option in Editor Profiles -> Plugin Parameters -> Link

https://cdn.joomlacontenteditor.net/tmp/101752-how-not-to-strip-full-urls-to-own-site.jpg

You can download JCE Pro 2.8.1 Beta 1 for testing here - https://www.joomlacontenteditor.net/downloads/editor/pro/development

Ryan Demmer

Lead Developer / CEO / CTO

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