RTC PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
2 Apr 2025

This PR is a for code/concept review

The aim of this PR is to add a new filter option when filtering for tags that allows you to filter all articles that have no tags at all.

image

It works but I am uncertain if its the correct approach - hence the draft pr for feedback.

Yes I know its a new feature so 5.4 may not be the correct branch - that can be changed later when I know if thats 5.4 or 6

This is only for com_content (articles and featured articles) if accepted then this can be extended to all components that have a filter by tag - that can be done later when I know this is accepted

Yes I know the language string is missing - that will come with #45232

Yes I know there are some unrelated files - this will be resolved with the next upmerge from 5.3 if I understand it correctly

To test create four articles
Article 1 no tags
Article 2 taga
Article 3 tagb
Article 4 taga and tagb

Using the filter check that the filter works correctly when selecting any of the tags AND/OR items with no tags (None)

You should be able to filter the articles on any single tag or combination of tags AND filter the articles with no tags and any single tag or combination of tags

Link to documentations

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 brianteeman brianteeman - open - 2 Apr 2025
avatar brianteeman brianteeman - change - 2 Apr 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Apr 2025
Category Administration com_content
ad81c20 2 Apr 2025 avatar brianteeman cs
avatar brianteeman brianteeman - change - 2 Apr 2025
Labels Added: PR-5.3-dev
avatar brianteeman brianteeman - change - 2 Apr 2025
The description was changed
avatar brianteeman brianteeman - edited - 2 Apr 2025
avatar joomla-cms-bot joomla-cms-bot - change - 2 Apr 2025
Category Administration com_content Administration com_content External Library Composer Change Libraries
avatar brianteeman brianteeman - change - 2 Apr 2025
The description was changed
avatar brianteeman brianteeman - edited - 2 Apr 2025
avatar brianteeman brianteeman - change - 2 Apr 2025
The description was changed
avatar brianteeman brianteeman - edited - 2 Apr 2025
avatar richard67
richard67 - comment - 2 Apr 2025

@brianteeman The unrelated changes will disappear when we have done the next upmerge from 5.3-dev to 5.4-dev and then updated this PR to 5.4-dev. So all ok.

avatar brianteeman brianteeman - change - 3 Apr 2025
Title
[DRAFT] Add tag filter none
[5.4] Add tag filter none
avatar brianteeman brianteeman - edited - 3 Apr 2025
avatar brianteeman brianteeman - change - 3 Apr 2025
The description was changed
avatar brianteeman brianteeman - edited - 3 Apr 2025
avatar exlemor
exlemor - comment - 3 Apr 2025

This PR is a for code/concept review

The aim of this PR is to add a new filter option when filtering for tags that allows you to filter all articles that have no tags at all.

Love the ability to filter all articles that have NO tags - so Thank you! @brianteeman!

avatar exlemor exlemor - test_item - 5 Apr 2025 - Tested successfully
avatar exlemor
exlemor - comment - 5 Apr 2025

I have tested this item ✅ successfully on e9ce9c0

I have tested this successfully. (Thank you @brianteeman).


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

avatar fgsw fgsw - test_item - 6 Apr 2025 - Tested successfully
avatar fgsw
fgsw - comment - 6 Apr 2025

I have tested this item ✅ successfully on e9ce9c0


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

avatar richard67 richard67 - change - 6 Apr 2025
Labels Added: Composer Dependency Changed PR-5.4-dev
Removed: PR-5.3-dev
avatar joomla-cms-bot joomla-cms-bot - change - 6 Apr 2025
Category Administration com_content External Library Composer Change Libraries Administration com_content External Library Composer Change
avatar joomla-cms-bot joomla-cms-bot - change - 6 Apr 2025
Category Administration com_content External Library Composer Change Administration com_content
avatar richard67 richard67 - alter_testresult - 6 Apr 2025 - exlemor: Tested successfully
avatar richard67 richard67 - alter_testresult - 6 Apr 2025 - fgsw: Tested successfully
avatar richard67 richard67 - change - 6 Apr 2025
Build 5.3-dev 5.4-dev
avatar brianteeman brianteeman - change - 6 Apr 2025
The description was changed
avatar brianteeman brianteeman - edited - 6 Apr 2025
avatar richard67
richard67 - comment - 6 Apr 2025

@brianteeman The tag filter allows to select more than one tag.

From reading the code and from a real test, I see that your code handles only the case that only the "None" option is selected.

But as soon as you select it in combination with another tag, the query finds only those with that tag.

For proper handling of a combination of the "None" option together with another tag, it would need to have some code in the if ($tag && \is_array($tag)) { case, similar to what @AdarshSantoria has done in his PR #45264

avatar brianteeman
brianteeman - comment - 6 Apr 2025

I was thinking that this morning. Will try to work out the query

avatar brianteeman brianteeman - change - 7 Apr 2025
Labels Removed: Composer Dependency Changed
avatar brianteeman
brianteeman - comment - 7 Apr 2025

@richard67 I cant get my head around that change - any help appreciated

avatar richard67
richard67 - comment - 7 Apr 2025

@richard67 I cant get my head around that change - any help appreciated

@brianteeman For "none" as the only option it might help not to use type safe comparison.

For the combination with other tags it needs something like this to be added to the case if it is an array below the } elseif ($tag && \is_array($tag)) {: https://github.com/joomla/joomla-cms/pull/45264/files#diff-add0f2892993b0d9480d645a92e769680f686d32a708025cbb466cd08c99b98aR427-R445

That means if the array contains a zero value, use the query with subquery, and if not, just use the old query.

avatar brianteeman
brianteeman - comment - 7 Apr 2025

I understood what query you meant I just cant get my head around creating it

488d1c5 7 Apr 2025 avatar brianteeman cs
avatar richard67
richard67 - comment - 7 Apr 2025

I understood what query you meant I just cant get my head around creating it

It might take some time until I can help with that, but I keep it in mind.

avatar chmst
chmst - comment - 13 Apr 2025

If this goes into 5.4, also featured filter and featured model must be included.

avatar brianteeman
brianteeman - comment - 13 Apr 2025

Thanks for not reading

avatar richard67
richard67 - comment - 13 Apr 2025

@brianteeman Not related to the previous 2 comments: I need a bit more time for finding the right query. It’s still on my task list and will not be forgotten. I plan to work on it on next weekend. Just wanted to let you know.

avatar brianteeman
brianteeman - comment - 13 Apr 2025

@richard67 I know I can rely on you

avatar richard67
richard67 - comment - 21 Apr 2025

@brianteeman I have something ready which I just have tested with success, but I have to go to a family meeting now. I will later submit a PR in your fork.

avatar richard67
richard67 - comment - 21 Apr 2025

@brianteeman I've found a way, see brianteeman#602 . It might look a bit complicated, but it covers all possible combinations of tag filter selections.

avatar brianteeman
brianteeman - comment - 21 Apr 2025

i've merged your change and will test fully tomorrow before removing draft status - thanks

avatar brianteeman brianteeman - change - 22 Apr 2025
The description was changed
avatar brianteeman brianteeman - edited - 22 Apr 2025
avatar brianteeman brianteeman - change - 22 Apr 2025
The description was changed
avatar brianteeman brianteeman - edited - 22 Apr 2025
avatar brianteeman
brianteeman - comment - 22 Apr 2025

This is now ready for testing thanks to the assistance of @richard67

avatar richard67
richard67 - comment - 22 Apr 2025

@brianteeman Maybe the testing instructions should be extended for the case that some articles have more than one tag assigned?

avatar brianteeman
brianteeman - comment - 22 Apr 2025

@brianteeman Maybe the testing instructions should be extended for the case that some articles have more than one tag assigned?

I thought I already did

Using the filter check that the filter works correctly when selecting any of the tags AND/OR items with no tags (None)

avatar brianteeman brianteeman - change - 22 Apr 2025
The description was changed
avatar brianteeman brianteeman - edited - 22 Apr 2025
avatar brianteeman
brianteeman - comment - 22 Apr 2025

Added an extra sentence to the test instructions for increased clarity

avatar richard67
richard67 - comment - 22 Apr 2025

@brianteeman Maybe the testing instructions should be extended for the case that some articles have more than one tag assigned?

I thought I already did

Using the filter check that the filter works correctly when selecting any of the tags AND/OR items with no tags (None)

@brianteeman That's for the different combinations in the filter. What I mean is:

To test create three articles
Article 1 no tags
Article 2 taga
Article 3 tagb

Change to e.g.:

To test create four articles
Article 1 no tags
Article 2 taga
Article 3 tagb
Article 4 taga and tagb

or something like that.

avatar brianteeman brianteeman - change - 22 Apr 2025
The description was changed
avatar brianteeman brianteeman - edited - 22 Apr 2025
avatar muhme
muhme - comment - 5 May 2025

Dear @fgsw, dear @exlemor, could you test again? That would be fantastic, thank you in advance.

avatar richard67
richard67 - comment - 5 May 2025

Dear @fgsw, dear @exlemor, could you test again? That would be fantastic, thank you in advance.

@fgsw @exlemor P.S.: Mind the updated testing instructions. Thanks in advance.

avatar exlemor exlemor - test_item - 5 May 2025 - Tested successfully
avatar exlemor
exlemor - comment - 5 May 2025

I have tested this item ✅ successfully on 0676089

I have successfully tested this!

It works with taga, tagb, taga+tagb, taga+None, tagb+None, Millions+Love+tagb, Millions+Love+Joomla+taga+tagb+None and many other combinations :) :D


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

avatar exlemor
exlemor - comment - 5 May 2025

Dear @fgsw, dear @exlemor, could you test again? That would be fantastic, thank you in advance.

@fgsw @exlemor P.S.: Mind the updated testing instructions. Thanks in advance.

Done for me ;)

avatar richard67 richard67 - test_item - 10 May 2025 - Tested successfully
avatar richard67
richard67 - comment - 10 May 2025

I have tested this item ✅ successfully on 0676089

Successfully tested with MySQL 8.0.41 and PostgreSQL 16.8.


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

avatar richard67 richard67 - change - 10 May 2025
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 10 May 2025

RTC


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

avatar richard67 richard67 - change - 10 May 2025
Labels Added: RTC
avatar muhme muhme - change - 10 May 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-05-10 15:56:02
Closed_By muhme
avatar muhme muhme - close - 10 May 2025
avatar muhme muhme - merge - 10 May 2025
avatar muhme
muhme - comment - 10 May 2025

Thx all

Add a Comment

Login with GitHub to post a comment