Skip to content
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

Excluded tags from trashed content #18164

Merged

Conversation

AndyButland
Copy link
Contributor

@AndyButland AndyButland commented Jan 29, 2025

Prerequisites

  • I have added steps to test this contribution in the description below

Fixes: #15524

Description

This PR backports the fix provided by @rammi987 in #15554.

I found in testing that PR that we didn't need the part around excluding unpublished content and it was sufficient to port over just the part relating to trashed content and media.

Other than the provided integration test, it can be reviewed using the following code added to a template:

@{
    @inject ITagQuery _tagQuery;
    var contentTags = _tagQuery.GetAllContentTags().OrderBy(x => x?.Text);
    <div>Content Tags: @string.Join(", ", contentTags.Select(x => x?.Text))</div>
    var mediaTags = _tagQuery.GetAllMediaTags().OrderBy(x => x?.Text);
    <div>Media Tags: @string.Join(", ", mediaTags.Select(x => x?.Text))</div>
}

And verifying that tagged content or media in the recycle bin aren't included in the displayed output.

I'll merge this one once the checks are happy as it's come from a community PR, so has already had two sets of eyes.

@AndyButland AndyButland merged commit ee2d7bb into v13/dev Jan 29, 2025
19 checks passed
@AndyButland AndyButland deleted the v13/bugfix/dont-include-trashed-content-in-tag-queries branch January 29, 2025 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant