-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[5.4] Author Filter Fix #45264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.4] Author Filter Fix #45264
Conversation
@AdarshSantoria Could you extend the testing instructions by a test case for the "Created by me" filter? Thanks in advance. |
Thanks for the suggestion. I will add the "Created by me" test case to the instructions. |
✅ Additional Test Cases for Author FilterThis extends the original test coverage for the
1. Created by me
2. Created by me + Admin
3. None (Deleted User) |
@brianteeman @fgsw Could you test this PR, too? Thanks in advance. |
I have tested this item ✅ successfully on c8faaf9 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45264. |
1 similar comment
I have tested this item ✅ successfully on c8faaf9 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45264. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45264. |
I have tested this item ✅ successfully on c8faaf9 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45264. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a join and then check for null value of the joined column would be better for performance than a subquery in a where clause, but the PR works fine, so for now that's ok.
Thanks all (author and testers). |
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 theircreated_by
values intact in the#__content
table — they just no longer exist in the#__users
table.This fix updates the logic to:
0
(representing "None")created_by NOT IN (SELECT id FROM #__users)
author_id = [0, 42]
, to include both deleted users and existing onesThis PR is a continuation and enhancement of #45186, extending support to
"by_me"
and fixing edge cases in combined filters.Testing Instructions
Actual result BEFORE applying this Pull Request
created_by = 0
was used incorrectly.Expected result AFTER applying this Pull Request
created_by NOT IN (SELECT id FROM #__users)
for deleted users.'Created by me'
filter is correctly replaced with the logged-in user's ID.["by_me"]
.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