PR-6.2-dev Pending

User tests: Successful: Unsuccessful:

avatar hiteshm0
hiteshm0
23 Jun 2026

Pull Request resolves #47976

  • 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

This PR fixes an issue where categories containing exclusively future-published items (or items with an expired publish_down date) are incorrectly counted as having active items, causing them to be improperly displayed in frontend category lists and modules

Implementation:

  1. Added a new check_dates opt-in parameter to the core Joomla\CMS\Categories\Categories::_load() method. When enabled, the item-counting subquery strictly enforces publish_up and publish_down window conditions.
  2. Enabled $options['check_dates'] = true; in the Category service constructors for com_content, com_contact, com_banners, and com_newsfeeds, as these core components actively utilize scheduled publishing dates.

Testing Instructions

  1. Create a Parent category and its child category.
  2. Create one more articles that belong to child category but have their publishing date somewhere in the future.
  3. Create a menu item of type 'Category Blog' for the Parent category.
  4. Go into the Parent Categories blog.

Actual result BEFORE applying this Pull Request

The category with the not yet published articles is displayed in the subcategories list
image
image

Expected result AFTER applying this Pull Request

The category with the not yet published articles is not displayed in the subcategories list
image

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 hiteshm0 hiteshm0 - open - 23 Jun 2026
avatar hiteshm0 hiteshm0 - change - 23 Jun 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Jun 2026
Category Front End com_banners com_contact com_content com_newsfeeds Libraries
avatar brianteeman
brianteeman - comment - 23 Jun 2026

It's good that you used this in all components that use categories but it's probably not needed in banners as I don't think there is any scenario where that would happen

avatar hiteshm0
hiteshm0 - comment - 24 Jun 2026

@brianteeman should i remove the changes made to the banner component?
although letting it be would make things more consistent with negligible performance overhead.

avatar brianteeman
brianteeman - comment - 24 Jun 2026

Consistency is good. I just wondered if the fix could be made earlier so it doesn't have to be repeated but if not then this is fine.

avatar HLeithner HLeithner - change - 24 Jun 2026
Title
[6.1]Fix: Empty categories displaying due to future-published items
[6.2]Fix: Empty categories displaying due to future-published items
avatar HLeithner HLeithner - edited - 24 Jun 2026
avatar HLeithner
HLeithner - comment - 24 Jun 2026

Thanks for you pr, I rebased this to 6.2 since it might not be expected behaviour I think doing this change in a patch release is an unexpected output change and would like to not do such things in a patch version.

avatar richard67 richard67 - change - 24 Jun 2026
Title
[6.2]Fix: Empty categories displaying due to future-published items
[6.2] Fix: Empty categories displaying due to future-published items
avatar richard67 richard67 - edited - 24 Jun 2026
avatar github-actions[bot]
github-actions[bot] - comment - 24 Jun 2026

This pull request has conflicts, please resolve those before we can evaluate the pull request.

avatar hiteshm0 hiteshm0 - change - 25 Jun 2026
Labels Added: Conflicting Files PR-6.2-dev
avatar hiteshm0 hiteshm0 - change - 25 Jun 2026
Labels Removed: Conflicting Files

Add a Comment

Login with GitHub to post a comment