PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
6 Dec 2025

Pull Request for Issue #46447, #18529 .

Summary of Changes

At the moment, for Category Blog menu item type, Joomla still loads articles if total number of articles configured for that menu item = 0. This PR just fixed that wrong behavior, see the linked issues to understand more details

Testing Instructions

  • Create two menu items, one links to Category Blog Layout menu item type and one to Category List menu item type.
  • Apply patch, confirm that two menu items still display articles same as before.
  • We will also needs confirmation from the author of the two issues confirm that the issue fixed

Actual result BEFORE applying this Pull Request

Works, but Joomla still query database to get articles when it is not needed, thus cause potential performance issue

Expected result AFTER applying this Pull Request

Works, no unnecessary query executed anymore if the menu item is configured to not show any articles

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar joomdonation joomdonation - open - 6 Dec 2025
avatar joomdonation joomdonation - change - 6 Dec 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 6 Dec 2025
Category Front End com_content
avatar brianteeman
brianteeman - comment - 6 Dec 2025

The problem is that in other areas setting to 0 means all articles eg in mod_articles

image
avatar AndySDH
AndySDH - comment - 6 Dec 2025

@brianteeman That's not a problem. The issue of this PR is tied to the Category Menu Item. The issue resides on the fact that, when putting 0 on all article fields in the Category Menu Item, it will display 0 articles (this is already the case, so no inconsistency here, it already always worked like this) but it still queries in the background the data from all articles, causing super slow loading despite showing the intended 0 articles at the end.

@joomdonation Thanks, I'll test this and report back.

avatar AndySDH AndySDH - test_item - 6 Dec 2025 - Tested successfully
avatar AndySDH
AndySDH - comment - 6 Dec 2025

I have tested this item ✅ successfully on 675eb71

Thank you, after over 8 years, I confirm this fixes the issue :D


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

avatar brianteeman
brianteeman - comment - 6 Dec 2025

Sorry you missed the point I was trying to make. In the module 0 = everything but in the component 0= nothing

avatar AndySDH
AndySDH - comment - 6 Dec 2025

Sorry you missed the point I was trying to make. In the module 0 = everything but in the component 0= nothing

No, I perfectly got your point. But your point has nothing to do with this PR or the issue is trying to fix.

avatar brianteeman
brianteeman - comment - 6 Dec 2025

Fair enough

avatar exlemor exlemor - test_item - 6 Dec 2025 - Tested successfully
avatar exlemor
exlemor - comment - 6 Dec 2025

I have tested this item ✅ successfully on 675eb71

I have tested this successfully. Thanks @joomdonation.

I turned on Debug, I had expected to see fewer queries but I got the same amount with or without the PR:
15 statements were executed, 2 of which were duplicates, 13 unique

(I assume that's fine, just thought I'd mention it just in case).


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

avatar joomdonation joomdonation - change - 7 Dec 2025
Labels Added: PR-5.4-dev
avatar joomdonation
joomdonation - comment - 7 Dec 2025

I turned on Debug, I had expected to see fewer queries but I got the same amount with or without the PR:

Yes. The queries should be fewer because we do not have to query database to get articles data. In my sample setup, before the change, there is 51 queries. After the change, only 42 queries (but my local site contains mix of things, not just fresh Joomla installation

avatar joomdonation
joomdonation - comment - 7 Dec 2025

@AndySDH @exlemor I made change to potential potential backward-compatibility breaks when certain extensions (modules, plugins) use Category model in blog category layout. I could not see anything from Joomla core, but want to be safe. Could you re-test? Thanks !

avatar AndySDH AndySDH - test_item - 7 Dec 2025 - Tested successfully
avatar AndySDH
AndySDH - comment - 7 Dec 2025

I have tested this item ✅ successfully on b6b868c

Confirm it still works after the new update.


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

avatar exlemor exlemor - test_item - 8 Dec 2025 - Tested successfully
avatar exlemor
exlemor - comment - 8 Dec 2025

I have tested this item ✅ successfully on b6b868c

I have re-tested this successfully. Thanks for your due diligence @joomdonation

In my case, still the same results BEFORE and AFTER applying the PR and clearing cache.
15 statements were executed, 2 of which were duplicates, 13 unique


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46542.
avatar richard67 richard67 - change - 8 Dec 2025
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 8 Dec 2025

RTC


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

Add a Comment

Login with GitHub to post a comment