Pgs Ss
unread,Mar 21, 2017, 11:06:00 AM3/21/17Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Joomla! General Development
I 've made a custom module, com_menubrand.
I want to make an Ajax (I use com_ajax) call to a php function in the module 's helper file.
I 've done it like this:
$.ajax({
type: "POST",
url: "index.php?option=com_ajax&module=menubrand& method=recreateMenuItemsB()&format=json",
success: function (result) {
console.log(result);
}
The function in my helper file:
public static function recreateMenuItemsBAjax() {
$return_data = "aaaa";
echo (json_encode($return_data));
}
But I get an error:
"Module mod_menubrand is not published, you do not have access to it, or it's not assigned to the current menu item."
And success = false.
How can I make it work?