? ? Pending

User tests: Successful: Unsuccessful:

avatar kienduongbk
kienduongbk
15 Jul 2021

…ction

When the user uses the ajax call back function getList on this module. this will return 500 because $app->getDocument() return null so getMetaData function undefined.

Pull Request for Issue # .

Summary of Changes

Testing Instructions

Actual result BEFORE applying this Pull Request

Expected result AFTER applying this Pull Request

Documentation Changes Required

avatar kienduongbk kienduongbk - open - 15 Jul 2021
avatar kienduongbk kienduongbk - change - 15 Jul 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 Jul 2021
Category Modules Front End
avatar richard67
richard67 - comment - 18 Jul 2021

@kienduongbk Please provide testing instructions. The head lines for that in the PR description are not there without a reason.

avatar richard67
richard67 - comment - 18 Jul 2021

@kienduongbk $app->getDocument() should work in J4, so please provide testing instructions or a detailed description on what you are doing to get that issue so we can see how it happens that$app->getDocument() return null in your scenario. Thanks in advance.

avatar kienduongbk
kienduongbk - comment - 19 Jul 2021

@richard67 Thank you for answer my issue.

I want to get a buffer of module banners for preview on the backend. So I build a function to call back on my plugin to get that.
module: mod_banners
URL: domain.com/index.php?action=getmodule&moduleid=xxx
I used ModuleHelper::renderModule($module, array('style'=>$style)) for return content.

https://prnt.sc/1czftq3

avatar Fedik
Fedik - comment - 19 Jul 2021

So I build a function to call back on my plugin to get that.

Here is your issue, you hacked in normal runtime request and trying to call your code before the document is ready.

Please have a look how to use ajax with your plugin or module https://docs.joomla.org/Using_Joomla_Ajax_Interface

What you trying to fix here is not Joomla issue.

avatar Quy Quy - change - 20 Jul 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-07-20 12:43:32
Closed_By Quy
Labels Added: ? ?
avatar Quy Quy - close - 20 Jul 2021
avatar kienduongbk
kienduongbk - comment - 21 Jul 2021

@Fedik Thanks.
I fixed it.

Add a Comment

Login with GitHub to post a comment