New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
com_ajax #30208
Comments
|
Duplicate #25684. Using client ID would be fine except that we can't determine it based on module name. Modules with the same name can be installed to both backend and frontend, e.g. like core |
I do not think it is an issue, you just have to do a correct request: for site modules: Same as with any component. |
This is no good if you want to use Ajax in module form. |
why you ever need that? :) It the same as for components, you cannot execute Site component by doing request to Backend, and vice versa. The same applies to the modules. |
To update form fields using AJAX. It's a reasonable use case. |
Ah okay, I finally get it, it for a module configuration form, not for a module itself 😄 Well, then, just add But, it should be forbidden to call administrator module from the site. So if someone call |
@Fedik i use this in admin panel modules |
What needs to be fixed
com_ajax
Why this should be fixed
Add functional ajax in admin module
How would you fix it
replace
$helperFile = JPATH_BASE . '/modules/mod_' . $module . '/helper.php';
to
$basePath = ($table->client_id) ? JPATH_ADMINISTRATOR : JPATH_SITE; $helperFile = $basePath . '/modules/mod_' . $module . '/helper.php';
remove
// Load language file for module $basePath = JPATH_BASE;
Side Effects expected
No
The text was updated successfully, but these errors were encountered: