Skip to content

[5.4] Add tag filter none com_newsfeeds #45460

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

Merged
merged 4 commits into from
May 20, 2025

Conversation

brianteeman
Copy link
Contributor

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

image

This is only for com_newsfeeds (articles and featured articles already done with #45274)

To test create four newsfeeds
Newsfeed 1 no tags
Newsfeed 2 taga
Newsfeed 3 3 tagb
Newsfeed 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 newsfeeds on any single tag or combination of tags AND filter the contacts with no tags and any single tag or combination of tags

Thanks to @richard67 for the query

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

@brianteeman
Copy link
Contributor Author

@richard67 I know this was your query but I wonder if it should be changed

from
$db->quoteName('tagmap.type_alias') . ' = ' . $db->quote('com_newsfeeds.newsfeed'),

to
$db->quoteName('tagmap.type_alias') . ' = :typeAlias',

@richard67
Copy link
Member

@brianteeman No, it's a hard-coded string and nothing from input, so no need for a bind variable here. See also where it is not modified by this PR: https://github.com/joomla/joomla-cms/pull/45460/files#diff-38c1de4d15fa0ac13f1c64c411eda1ae91777431a00ca4a6ba2a2e906f9c1138R337

@brianteeman
Copy link
Contributor Author

I was prompted to ask the question when I saw

$db->quoteName('tagmap.type_alias') . ' = :typeAlias',

@brianteeman
Copy link
Contributor Author

brianteeman commented May 11, 2025

never mind I can see why com_categories is different

@richard67
Copy link
Member

richard67 commented May 11, 2025

never mind I can see why com_categories is different

Yes, cause there the code is used for different contexts (type aliases).

@exlemor
Copy link

exlemor commented May 17, 2025

I have tested this item ✅ successfully on b905a3f

I have tested this successfully just like for com_contact.

Works as expected: None, TagA, TagB, TagA+TagB, None+TagA, None+TagB, None+TagA+TagB :)


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

@krishnaGandhi11
Copy link

I have tested this item ✅ successfully on b905a3f

I have tested this PR, works as expected!


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

@richard67
Copy link
Member

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label May 19, 2025
@muhme muhme merged commit 750e38e into joomla:5.4-dev May 20, 2025
3 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label May 20, 2025
@muhme
Copy link
Contributor

muhme commented May 20, 2025

Thank you all for your contribution.

@brianteeman
Copy link
Contributor Author

thanks

@brianteeman brianteeman deleted the newsfeed_tag_none branch May 20, 2025 06:12
@richard67 richard67 added this to the Joomla! 5.4.0 milestone May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants