No Code Attached Yet
avatar CrazySeb69
CrazySeb69
12 Sep 2023

Steps to reproduce the issue

  1. With custom developed module set "Module Assignment" to anything else than "On all pages" on module configuration.
  2. Use module with ajax call using com_ajax interface
  3. ModuleHelper::getModule returns object with null values (modue title, position, params, etc)
  4. When using module without com_ajax ModuleHelper::getModule returns values correctly.

System information (as much as possible)

Dockerized Joomla 4.x with PostgreSQL database

Additional comments

avatar CrazySeb69 CrazySeb69 - open - 12 Sep 2023
avatar CrazySeb69 CrazySeb69 - change - 12 Sep 2023
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 12 Sep 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 12 Sep 2023
avatar Fedik Fedik - change - 12 Sep 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-09-12 09:48:32
Closed_By Fedik
avatar Fedik
Fedik - comment - 12 Sep 2023

to anything else than "On all pages" on module

When you asign your module to specific page, then it can be shown only there.
And com_ajax does not know what page is active.

You have to do your AJAX request with specified Itemid=x parameter in URL, where x is a active menu ID.
You can get current Itemid with: $app->getInput()->get('Itemid')

avatar Fedik Fedik - close - 12 Sep 2023

Add a Comment

Login with GitHub to post a comment