User tests: Successful: Unsuccessful:
Pull Request resolves #47976
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
[Edit] Scope of the PR was improved to include a fix wherein the heading 'Subcategories' was displayed category blogs/list modules even if there was no valid subcategory to display.
Implementation:
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.$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.The category with the not yet published articles is displayed in the subcategories list


The category with the not yet published articles is not displayed in the subcategories list and the heading subcategories is not present either.

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 com_banners com_contact com_content com_newsfeeds Libraries |
@brianteeman should i remove the changes made to the banner component?
although letting it be would make things more consistent with negligible performance overhead.
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.
| Title |
|
||||||
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.
| Title |
|
||||||
This pull request has conflicts, please resolve those before we can evaluate the pull request.
| Labels |
Added:
Conflicting Files
PR-6.2-dev
|
||
| Labels |
Removed:
Conflicting Files
|
||
This PR solves #47976 only partially. The category with an article to be published in the future doesn't appear in the list of categories (List All Categories in an Article Category Tree), but in the module "Articles - Categories" is still there.
In a category blog it doesn't show either, but the heading "Subcategories" alone looks odd.
I have tested this item 🔴 unsuccessfully on 9de434d
I was unable to reproduce the problem.
The Patch Tester does not contain PRs J6.2
I have tested this item 🔴 unsuccessfully on 9de434d
I was unable to reproduce the problem.
The Patch Tester does not contain PRs J6.2
In a category blog it doesn't show either, but the heading "Subcategories" alone looks odd.
and
but in the module "Articles - Categories" is still there.
are both expected behavior if im not wrong ( or rather not caused by a yet to be published article in said category)
( even if said category does not contain any articles , the category is still displayed in those places )
In a category blog it doesn't show either, but the heading "Subcategories" alone looks odd.
and
but in the module "Articles - Categories" is still there.
are both expected behavior if im not wrong ( or rather not caused by a yet to be published article in said category)
( even if said category does not contain any articles , the category is still displayed in those places )
Should we extend the scope of this PR to fix those bugs too?
For me it is not expected behavior, and if we are correcting it for the list of categories, it should be corrected for the list of categories in the module too.
| Category | Front End com_banners com_contact com_content com_newsfeeds Libraries | ⇒ | Front End com_banners com_contact com_content com_newsfeeds Layout Libraries |
@drmenzelit
Included the fix to avoid displaying 'Subcategories' when there is no valid subcategory to display in category blog/list modules. Please take a look ( necessary changes have been made to the testing instructions aswell)
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