User tests: Successful: Unsuccessful:
Pull Request resolves #46899 .
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.
{loadposition } command to load a module position.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...)
The module loads the article, but then the loadmodule plugin stops at that point.
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
| Status | New | ⇒ | Pending |
| Category | ⇒ | Front End Plugins |
I have tested this item ✅ successfully on 0592c3a
I have tested this item ✅ successfully on 0592c3a
| Status | Pending | ⇒ | Ready to Commit |
| Labels |
Added:
RMDQ
PR-5.4-dev
|
||
RTC
@mariantanase I think you did not produce a recursion.
This PR needs some more testing. Please don't merge.
I have not tested this item.
Needs more tests
| Status | Ready to Commit | ⇒ | Pending |
Back to pending due to reverted 2nd human test.
I have tested this item ✅ successfully on 0592c3a
Re-tested with different modules and articles. All fine.
| Status | Pending | ⇒ | Ready to Commit |
RTC again
| Status | Ready to Commit | ⇒ | Pending |
Back to pending due to requested changes. See previous code reviews. @Hackwar Could you check? Thanks in advance.
| Labels |
Added:
Updates Requested
bug
Removed: RMDQ |
||
It is good now :)
@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.
| Labels |
Removed:
Updates Requested
|
||
I have tested this item ✅ successfully on 4f3f220
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
| Status | Pending | ⇒ | Ready to Commit |
RTC
| Labels |
Added:
RTC
|
||
I have tested this item 🔴 unsuccessfully on 5a85c05
Final test before merge using JBT
{loadmodule mod_articles} and site module Articles, with articles category and Introtext enabledWarning: 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
| Status | Ready to Commit | ⇒ | Pending |
Back to 'Pending', @Hackwar could you check please?
| Labels |
Removed:
RTC
|
||
Fixed
@ThomasFinnern and @ChristineWk may I ask you to test again? It would be best to test loadposition and loadmodule.
I have tested this item ✅ successfully on ae4c185
Did test both test cases
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"
I have tested this item ✅ successfully on ae4c185
| Labels |
Added:
RMDQ
|
||
| Status | Pending | ⇒ | Ready to Commit |
RTC
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.
| Labels |
Added:
RTC
|
||
✅ Final Test before merge with JBT
main-top{loadmodule mod_articles} or{loadposition main-top}{loadmodule mod_articles} is shown, or {loadposition main-top} or both if both articles are enabled| 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
|
||
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.
I followed the testing instructions, but I don't see that behavior. It works correctly without the PR.