RTC bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
23 Feb 2026

Pull Request resolves #46899 .

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

When you have an article which loads a module position which loads a module which in itself again contains the same article, you can run into an endless recursion, killing the site. This PR introduces a recursion block to prevent stuff like this. If the plugin is run with the same configuration more than once, it simply skips the output again.

Testing Instructions

  1. Create an article which contains a {loadposition } command to load a module position.
  2. Create an article module, which loads the article you previously created.

Actual result BEFORE applying this Pull Request

The server runs into a 500 error due to infinite recursion (The module loads the article, which loads the module, which loads the article, which...)

Expected result AFTER applying this Pull Request

The module loads the article, but then the loadmodule plugin stops at that point.

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar Hackwar Hackwar - open - 23 Feb 2026
avatar Hackwar Hackwar - change - 23 Feb 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Feb 2026
Category Front End Plugins
avatar Hackwar Hackwar - change - 24 Feb 2026
The description was changed
avatar Hackwar Hackwar - edited - 24 Feb 2026
avatar mariantanase
mariantanase - comment - 24 Feb 2026

I followed the testing instructions, but I don't see that behavior. It works correctly without the PR.

avatar chmst chmst - test_item - 25 Feb 2026 - Tested successfully
avatar chmst
chmst - comment - 25 Feb 2026

I have tested this item ✅ successfully on 0592c3a


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47208.

avatar ChristineWk ChristineWk - test_item - 25 Feb 2026 - Tested successfully
avatar ChristineWk
ChristineWk - comment - 25 Feb 2026

I have tested this item ✅ successfully on 0592c3a


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47208.

avatar richard67 richard67 - change - 25 Feb 2026
Status Pending Ready to Commit
Labels Added: RMDQ PR-5.4-dev
avatar richard67
richard67 - comment - 25 Feb 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47208.

avatar chmst
chmst - comment - 25 Feb 2026

@mariantanase I think you did not produce a recursion.

This PR needs some more testing. Please don't merge.

avatar chmst chmst - test_item - 25 Feb 2026 - Not tested
avatar chmst
chmst - comment - 25 Feb 2026

I have not tested this item.

Needs more tests


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47208.

avatar richard67 richard67 - change - 25 Feb 2026
Status Ready to Commit Pending
avatar richard67
richard67 - comment - 25 Feb 2026

Back to pending due to reverted 2nd human test.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47208.

avatar chmst chmst - test_item - 25 Feb 2026 - Tested successfully
avatar chmst
chmst - comment - 25 Feb 2026

I have tested this item ✅ successfully on 0592c3a

Re-tested with different modules and articles. All fine.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47208.

avatar chmst chmst - change - 25 Feb 2026
Status Pending Ready to Commit
avatar chmst
chmst - comment - 25 Feb 2026

RTC again


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47208.

avatar richard67 richard67 - change - 25 Feb 2026
Status Ready to Commit Pending
avatar richard67
richard67 - comment - 25 Feb 2026

Back to pending due to requested changes. See previous code reviews. @Hackwar Could you check? Thanks in advance.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47208.

avatar Hackwar Hackwar - change - 27 Feb 2026
Labels Added: Updates Requested bug
Removed: RMDQ
avatar richard67
richard67 - comment - 27 Feb 2026

@Fedik Could you review and check if it ok now? Thanks in advance.

avatar Fedik
Fedik - comment - 27 Feb 2026

It is good now :)

avatar richard67
richard67 - comment - 27 Feb 2026

@chmst @ChristineWk If you can find the time, could you test this PR again with the latest changes? That would be really great. Thanks for the previous tests, and thanks in advance for new ones.

avatar Hackwar Hackwar - change - 27 Feb 2026
Labels Removed: Updates Requested
avatar ChristineWk ChristineWk - test_item - 4 Mar 2026 - Tested successfully
avatar ChristineWk
ChristineWk - comment - 4 Mar 2026

I have tested this item ✅ successfully on 4f3f220


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47208.

avatar ThomasFinnern ThomasFinnern - test_item - 6 Mar 2026 - Tested successfully
avatar ThomasFinnern
ThomasFinnern - comment - 6 Mar 2026

I have tested this item ✅ successfully on 4f3f220

I used {loadposition main-top} in articles and selected same position in the articles module and have seen the site 'endless loading' and crashing
Aplying the PR it is working


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47208.

avatar richard67 richard67 - change - 6 Mar 2026
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 6 Mar 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47208.

avatar muhme muhme - change - 7 Mar 2026
Labels Added: RTC
avatar muhme muhme - test_item - 7 Mar 2026 - Tested unsuccessfully
avatar muhme
muhme - comment - 7 Mar 2026

I have tested this item 🔴 unsuccessfully on 5a85c05

Final test before merge using JBT

  • Seen site crashing with OutOfMemory with article with {loadmodule mod_articles} and site module Articles, with articles category and Introtext enabled
  • Applied PR with Patch Tester, Site is no more crashing, but has PHP warnings and deprecations:
Warning: Undefined variable $match in /var/www/html/plugins/content/loadmodule/src/Extension/LoadModule.php on line 145
Warning: Trying to access array offset on null in /var/www/html/plugins/content/loadmodule/src/Extension/LoadModule.php on line 145
Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/plugins/content/loadmodule/src/Extension/LoadModule.php on line 145
Warning: Undefined variable $match in /var/www/html/plugins/content/loadmodule/src/Extension/LoadModule.php on line 149
Warning: Trying to access array offset on null in /var/www/html/plugins/content/loadmodule/src/Extension/LoadModule.php on line 149
Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/plugins/content/loadmodule/src/Extension/LoadModule.php on line 149
Warning: Undefined variable $match in /var/www/html/plugins/content/loadmodule/src/Extension/LoadModule.php on line 177
Warning: Trying to access array offset on null in /var/www/html/plugins/content/loadmodule/src/Extension/LoadModule.php on line 177
  • This was seen with PHP 8.5 (used as default), but is the same situation for PHP 8.4

This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47208.
avatar muhme muhme - change - 7 Mar 2026
Status Ready to Commit Pending
avatar muhme
muhme - comment - 7 Mar 2026

Back to 'Pending', @Hackwar could you check please?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47208.

avatar Hackwar Hackwar - change - 7 Mar 2026
Labels Removed: RTC
avatar Hackwar
Hackwar - comment - 7 Mar 2026

Fixed

avatar muhme
muhme - comment - 7 Mar 2026

@ThomasFinnern and @ChristineWk may I ask you to test again? It would be best to test loadposition and loadmodule.

avatar ThomasFinnern ThomasFinnern - test_item - 13 Mar 2026 - Tested successfully
avatar ThomasFinnern
ThomasFinnern - comment - 13 Mar 2026

I have tested this item ✅ successfully on ae4c185

Did test both test cases


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47208.

avatar brianteeman
brianteeman - comment - 13 Mar 2026

Sorry but I diont think this is good enough. It does stop the crash but there is nothing obvious to the user why they are seeing an unprocessed {loadmodule xxx} in their module output. They will just come back and complain that the loadmodule plugin is not working and it will be very hard to debug at this point. Instead of spitting out the unprocessed string it would be better to output a meaningful message such as "recursion detected you are loading a module inside a module and we prevented that from happening so your site didnt break"

avatar krishnagandhicode krishnagandhicode - test_item - 13 Mar 2026 - Tested successfully
avatar krishnagandhicode
krishnagandhicode - comment - 13 Mar 2026

I have tested this item ✅ successfully on ae4c185


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47208.

avatar richard67 richard67 - change - 13 Mar 2026
Labels Added: RMDQ
avatar richard67 richard67 - alter_testresult - 13 Mar 2026 - ThomasFinnern: Tested successfully
avatar richard67 richard67 - alter_testresult - 13 Mar 2026 - krishnagandhicode: Tested successfully
avatar richard67 richard67 - change - 13 Mar 2026
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 13 Mar 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47208.

avatar richard67
richard67 - comment - 13 Mar 2026

Setting RTC as it has 2 successful tests. But I've also set the RMDQ (release managers decision queue) label. We will discuss that and come back.

avatar muhme muhme - change - 3 Apr 2026
Labels Added: RTC
avatar muhme
muhme - comment - 3 Apr 2026

Discussed in maintainer meeting. Afterwards we decided to merge this PR and continue to fix with follow-up bug-issue #47544

avatar muhme
muhme - comment - 3 Apr 2026

✅ Final Test before merge with JBT

  • Created a site module 'Articles', with 'Uncategorised' category, Introtext enabled and placed on main-top
  • Before PR seen frontend site crashing with OutOfMemory
    • 1st article with {loadmodule mod_articles} or
    • 2nd article with {loadposition main-top}
  • Applied PR with Patch Tester
    • Site is no more crashing
    • Unprocessed {loadmodule mod_articles} is shown, or {loadposition main-top} or both if both articles are enabled
    • As discussed a meaningful message should extend the unprocessed strings,
      as it will be very hard to debug -> therefore a following bug-issue #47544 was opened
    • No PHP warnings and deprecations (as in one of the previous tests)
avatar muhme muhme - close - 3 Apr 2026
avatar muhme muhme - merge - 3 Apr 2026
avatar muhme muhme - change - 3 Apr 2026
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2026-04-03 15:45:43
Closed_By muhme
Labels Removed: RMDQ
avatar muhme
muhme - comment - 3 Apr 2026

Thank you very much @Hackwar for your contribution. Thanks to @Fedik, @brianteeman and @mariantanase for supporting. Thanks to @chmst, @ChristineWk, @ThomasFinnern and @krishnagandhicode for testing.

Add a Comment

Login with GitHub to post a comment