No Code Attached Yet
avatar carlitorweb
carlitorweb
31 Dec 2022

Steps to reproduce the issue

The example is using the module Articles Category, but I think can be any extension or process who do something similar.

Using the module Articles Category, put the Count option inside the Filtering Options tab, with 3 or more (you can put 0 in this way will show all articles). Also, inside the Display Options tab, show the introtext.

Expected result

The module show the articles in the fronted

Actual result

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 8192 bytes) in....

Additional comments

Checking the code I think is related with the load method HTMLHelper::_(...).
I copy and paste the content of the method Joomla\CMS\HTML\Helpers\Content::prepare() directly inside the Helper class of the module (without the need of use HTMLHelper::_('content.prepare'......)) and all worked as expected....But really could not catch where the error is happening.

avatar carlitorweb carlitorweb - open - 31 Dec 2022
avatar joomla-cms-bot joomla-cms-bot - change - 31 Dec 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 31 Dec 2022
avatar richard67
richard67 - comment - 31 Dec 2022

@carlitorweb Do you see the call stack when switching on debug in global configuration?

avatar carlitorweb
carlitorweb - comment - 1 Jan 2023

@carlitorweb Do you see the call stack when switching on debug in global configuration?

No, unfortunately the page do not show the call stack. Just a white page with the error.

avatar Fedik
Fedik - comment - 7 Jan 2023

No, unfortunately the page do not show the call stack. Just a white page with the error.

So it Joomla 3 right? Can you please test the same on joomla 4

The error may be dute to a huge amount of content in your articles categories or one of them, (especialy when you set to "show all articles").
Can happen when one of articles contain huge base64 encoded image, or some kind of copy-paste from MS Office.

Just guessing.

avatar carlitorweb
carlitorweb - comment - 7 Jan 2023

@Fedik no, is J4 and sample test data from a test site. I tried with xdebug to track the problem, but really not lead me to any place (I can upload some screenshot if you want of this)

avatar Fedik
Fedik - comment - 7 Jan 2023

Okay, strange then. No need screenshot.

avatar Fedik
Fedik - comment - 7 Jan 2023

I just checked, you can get a recursion when you show all child categories, and because one of Article is a demo for "Article category" module it tries to render all over again, you get a loop.

Do you have this issue on real world site?

avatar carlitorweb
carlitorweb - comment - 7 Jan 2023

I raise well enough the PHP memory but did not fixed the problem.

Then when debug the error, the first stop is here. But from there not lead me to any place really...maybe is me who not see well the problem

Captura

avatar Fedik
Fedik - comment - 7 Jan 2023

What happens when you set option "Child Category Articles" to "exclude"?

avatar carlitorweb
carlitorweb - comment - 7 Jan 2023

Do you have this issue on real world site?

No, with bugtesting site I have. A cloned one.

I just checked, you can get a recursion when you show all child categories, and because one of Article is a demo for "Article category" module it tries to render all over again, you get a loop.

Interesting, let me check this

avatar carlitorweb
carlitorweb - comment - 7 Jan 2023

What happens when you set option "Child Category Articles" to "exclude"?

I had already on exclude. But I understand what do you mean, and then this only happen in a test site.

avatar carlitorweb
carlitorweb - comment - 7 Jan 2023

Yep, is that. I removed from the module the categories who render in their article content, another module, and all is working.
Good catch @Fedik with the loop.

avatar carlitorweb
carlitorweb - comment - 7 Jan 2023

I will close the issue, but not sure if this classify as a bug? A module who render itself in a loop...

avatar Fedik
Fedik - comment - 7 Jan 2023

I think we cannot prevent such recursion.

avatar carlitorweb carlitorweb - change - 7 Jan 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-01-07 13:39:51
Closed_By carlitorweb
avatar carlitorweb carlitorweb - close - 7 Jan 2023

Add a Comment

Login with GitHub to post a comment