2

I'm trying to use Joomla's com_ajax for my module by using this url : index.php?option=com_ajax&module=MODNAME&method=MODMETHOD&format=json

However my helper.php file is located under folder modules/mod_modname/helper/ while joomla's com_ajax is always trying to find the helper file in modules/mod_modname/ so it returned error :

> {"success":false,"message":"The file at mod_modname\/helper.php does
> not exist.","messages":null,"data":null}

How can I tell the com_ajax the path of my helper.php file?

3

You can't.

The component looks for the helper like so:

$helperFile = JPATH_BASE . '/modules/mod_' . $module . '/helper.php';

where $module is the name of your module.

You will have to move the helper.php to modules/mod_modname

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.