RTC PR-5.3-dev PR-5.4-dev Pending

User tests: Successful: 0 Unsuccessful: 0

avatar AdarshSantoria
AdarshSantoria
22 Mar 2025

Pull Request for Issue #45181

Summary of Changes

This PR fixes a bug where filtering articles by Author = None did not return articles created by deleted users. Joomla previously used created_by = 0 for the "None" filter, but in reality, deleted users leave their created_by values intact in the #__content table — they just no longer exist in the #__users table.

This fix updates the logic to:

  • Detect when the filter is set to 0 (representing "None")
  • Return articles where created_by NOT IN (SELECT id FROM #__users)
  • Support multi-select filters, e.g. author_id = [0, 42], to include both deleted users and existing ones

Testing Instructions

  1. Create two users in Joomla.
  2. Create articles using each user.
  3. Delete one of the users via Users > Manage.
  4. Go to Content > Articles.
  5. Apply the Author filter:
    • Select "None" → should show article by deleted user ✅
    • Select deleted user + another existing user → both articles show ✅
    • Select only existing user → shows only that user’s articles ✅

Actual result BEFORE applying this Pull Request

Screenshot (9)

  • Filtering by Author = None shows no articles.
  • Deleted users are not handled properly in the query.
  • created_by = 0 was used incorrectly.

Expected result AFTER applying this Pull Request

Screenshot (10)

  • Articles created by deleted users appear when Author = None is selected.
  • Query uses created_by NOT IN (SELECT id FROM #__users) for deleted users.
  • Filtering works as expected for mixed author selections (deleted + existing).

Link to documentation

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 AdarshSantoria AdarshSantoria - open - 22 Mar 2025
avatar AdarshSantoria AdarshSantoria - change - 22 Mar 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Mar 2025
Category Administration com_content
avatar fgsw
fgsw - comment - 22 Mar 2025

@AdarshSantoria Please delete "Fix #45181 - " from the title.

The title say [5.3], but the label is PR-5.2-dev.

avatar AdarshSantoria AdarshSantoria - change - 22 Mar 2025
Title
[5.3] Fix #45181 - Author Filter Now Supports Deleted Users
[5.3] Author Filter Now Supports Deleted Users
avatar AdarshSantoria AdarshSantoria - edited - 22 Mar 2025
avatar AdarshSantoria AdarshSantoria - change - 22 Mar 2025
Labels Added: PR-5.2-dev
avatar brianteeman brianteeman - test_item - 22 Mar 2025 - Tested successfully
avatar brianteeman
brianteeman - comment - 22 Mar 2025

I have tested this item ✅ successfully on 66cd254


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

avatar AdarshSantoria
AdarshSantoria - comment - 22 Mar 2025

Thank you for your feedbacks, @fgsw @brianteeman.

avatar brianteeman
brianteeman - comment - 22 Mar 2025

great work!!

avatar fgsw fgsw - test_item - 22 Mar 2025 - Tested successfully
avatar fgsw
fgsw - comment - 22 Mar 2025

I have tested this item ✅ successfully on 66cd254

Before PR

No deleted user

without1

One deleted user

without2

After PR

One deleted user

with1

Three deleted user

with2


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45186.
avatar richard67 richard67 - change - 22 Mar 2025
Status Pending Ready to Commit
Build 5.2-dev 5.3-dev
avatar richard67
richard67 - comment - 22 Mar 2025

RTC


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

avatar bembelimen
bembelimen - comment - 25 Mar 2025

Good work with this PR, really like it, just found a minor thing you probably could fix.

avatar AdarshSantoria AdarshSantoria - change - 26 Mar 2025
Labels Added: RTC PR-5.3-dev
Removed: PR-5.2-dev
avatar richard67 richard67 - change - 26 Mar 2025
Title
[5.3] Author Filter Now Supports Deleted Users
[5.4] Author Filter Now Supports Deleted Users
avatar richard67 richard67 - edited - 26 Mar 2025
avatar richard67
richard67 - comment - 26 Mar 2025

As agreed today in the maintainers meeting, I've rebased this PR to 5.4-dev.

avatar richard67 richard67 - change - 26 Mar 2025
Labels Added: PR-5.4-dev

Add a Comment

Login with GitHub to post a comment