Create two users
Create articles with each user
Delete one of the users
use the author filter to filter for "none"
the article by the deleted user is displayed
no articles are displayed
This is because the filter is setting an id of 0 when you filter by author nonw so the query is looking for a user with a created_by id of 0 BUT When a user is deleted from the users table the created_by in the content table is untouched so the condition in the query is never passed.
SELECT
a.
id,
a.
asset_id,
a.
title,
a.
alias,
a.
checked_out,
a.
checked_out_time,
a.
catid,
a.
state,
a.
access,
a.
created,
a.
created_by,
a.
created_by_alias,
a.
modified,
a.
ordering,
a.
featured,
a.
language,
a.
hits,
a.
publish_up,
a.
publish_down,
a.
introtext,
a.
fulltext,
a.
note,
a.
images,
a.
metakey,
a.
metadesc,
a.
metadata,
a.
version,
fp.
featured_up,
fp.
featured_down,
l.
titleAS
language_title,
l.
imageAS
language_image,
uc.
nameAS
editor,
ag.
titleAS
access_level,
c.
titleAS
category_title,
c.
created_user_idAS
category_uid,
c.
levelAS
category_level,
c.
publishedAS
category_published,
parent.
titleAS
parent_category_title,
parent.
idAS
parent_category_id,
parent.
created_user_idAS
parent_category_uid,
parent.
levelAS
parent_category_level,
ua.
nameAS
author_name,
wa.
stage_idAS
stage_id,
ws.
titleAS
stage_title,
ws.
workflow_idAS
workflow_id,
w.
titleAS
workflow_titleFROM
jos_contentAS
aLEFT JOIN
jos_languagesAS
lON
l.
lang_code=
a.
languageLEFT JOIN
jos_content_frontpageAS
fpON
fp.
content_id=
a.
idLEFT JOIN
jos_usersAS
ucON
uc.
id=
a.
checked_outLEFT JOIN
jos_viewlevelsAS
agON
ag.
id=
a.
accessLEFT JOIN
jos_categoriesAS
cON
c.
id=
a.
catidLEFT JOIN
jos_categoriesAS
parentON
parent.
id=
c.
parent_idLEFT JOIN
jos_usersAS
uaON
ua.
id=
a.
created_byINNER JOIN
jos_workflow_associationsAS
waON
wa.
item_id=
a.
idINNER JOIN
jos_workflow_stagesAS
wsON
ws.
id=
wa.
stage_idINNER JOIN
jos_workflowsAS
wON
w.
id=
ws.
workflow_idWHERE
wa.
extension= 'com_content.article' AND
a.
stateIN (1,0) AND
a.
created_by IN (0) ORDER BY a.id DESC LIMIT 20
I am unsure of the correct query for author = none but it should probably be checking that created_by exists in #__users and not for created_by = 0
this is just an example with com_content - the same problem will exist in all uses of the authors field for filters
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
bug
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-03-22 08:28:28 |
Closed_By | ⇒ | brianteeman |
closed as we have a pr for testing