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.titleASlanguage_title,l.imageASlanguage_image,uc.nameASeditor,ag.titleASaccess_level,c.titleAScategory_title,c.created_user_idAScategory_uid,c.levelAScategory_level,c.publishedAScategory_published,parent.titleASparent_category_title,parent.idASparent_category_id,parent.created_user_idASparent_category_uid,parent.levelASparent_category_level,ua.nameASauthor_name,wa.stage_idASstage_id,ws.titleASstage_title,ws.workflow_idASworkflow_id,w.titleASworkflow_titleFROMjos_contentASaLEFT JOINjos_languagesASlONl.lang_code=a.languageLEFT JOINjos_content_frontpageASfpONfp.content_id=a.idLEFT JOINjos_usersASucONuc.id=a.checked_outLEFT JOINjos_viewlevelsASagONag.id=a.accessLEFT JOINjos_categoriesAScONc.id=a.catidLEFT JOINjos_categoriesASparentONparent.id=c.parent_idLEFT JOINjos_usersASuaONua.id=a.created_byINNER JOINjos_workflow_associationsASwaONwa.item_id=a.idINNER JOINjos_workflow_stagesASwsONws.id=wa.stage_idINNER JOINjos_workflowsASwONw.id=ws.workflow_idWHEREwa.extension= 'com_content.article' ANDa.stateIN (1,0) ANDa.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