Solved API call not rendering Absolute URLS

ontarget

Active Member
This is not so much a fabrik issue but more of a Joomla one and I wonder if anyone knows the solution. :)
I have created an API that gets joomla table data. The API call allows third parties to get the table data and render it as a uikit table.
Using code mirror I put my code to call the API into a joomla custom module on the third party website.

Despite using Absolute URLs in my code to generate the links and the img src the joomla site that is calling my API always prepends these links with the site url.

My API call is fetching the event id from the table and i wish to link to it.

Code:
const id = event.id;
const eventLink = `https://esci.ie/index.php?option=com_eventbooking&view=event&id=${id}`;

<a href="${eventLink}" target="_blank" rel="noopener noreferrer">View Event</a>

The link renders as :
https://www.mywebsite.com/https://esci.ie/index.php?option=com_eventbooking&view=event&id=1

Despite using an Absolute URL!!
I have ordered the SEF system plugin to last position but doesnt make a difference.
I have also disable SEF urls but again no difference.

If i put my code into the root directory of the server as a bog standard html page the links work perfectly.
Why does joomla ignore my absolute url reference and prepend it with the site url?
 
Ok I solved this:
Code:
const eventLink = `href ="${esciURL}index.php?option=com_eventbooking&view=event&id=${id}"`;
<a ${eventLink}>View Event</a>
 

Members online

No members online now.
Back
Top