Search
Other Sourcerer questions
Forum

Adding script fails with Joomla 4.2.9

Jean Machuron's Avatar Jean Machuron
Hi Peter

I am testing sourcerer to add a php file in a module position
This works fine to include the php file but I cannot get it to add the script.
My code is very simple :
{source}
<?php
$doc->addScript( JURI::root( true ).'/ahatools/activations/js/actia_dev.js' ); 
include_once JPATH_SITE.'/ahatools/activations/calculator_ia.php';
?>
{/source}

The php file is correctly executed but there is no way to load the actia_dev.js file.
Whether I include the line in the php or in the source tags, it's not getting loaded.

Of course the file does exist and it's correctly loaded from another script elsewhere in the website.

Could you help me on this ?

Thanks a lot
Jean
Peter van Westen's Avatar Peter van Westen ADMIN
Do you have this code in an article or in a module?
If in a 'Custom' module, make sure you switch on the Prepare Content option in that module.
Please post a rating at the Joomla! Extensions Directory
Jean Machuron's Avatar Jean Machuron
What an idiot I am sometimes 🙁
Of course thanks a lot 🙂
Peter van Westen's Avatar Peter van Westen ADMIN
?
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription