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

TagQuery.GetAllContentTags includes trashed content #15524

Closed
jemayn opened this issue Jan 3, 2024 · 4 comments
Closed

TagQuery.GetAllContentTags includes trashed content #15524

jemayn opened this issue Jan 3, 2024 · 4 comments

Comments

@jemayn
Copy link
Contributor

jemayn commented Jan 3, 2024

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

13.0.1

Bug summary

I am using the tagQuery to get all tags in a specific group. It had a tag in the results that I couldn't find anywhere on the site, but finally found it on a node in the recycle bin.

I also tried to do a check for the TagModel.NodeCount, but that also had 1 even if that node is in the recycle bin.

Specifics

No response

Steps to reproduce

  1. Add a tag field on a page
  2. Output all tags in the frontend via TagQuery.GetAllContentTags
  3. Add another page with a new tag and move it to the recycle bin
  4. Now the tag is shown in the list in the frontend

Expected result / actual result

I'd expect that it either as default would not include tags that only exist on trashed content, or an overload on the method to determine whether to include them or not.

@jemayn jemayn added the type/bug label Jan 3, 2024
Copy link

github-actions bot commented Jan 3, 2024

Hi there @jemayn!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

  • We'll assess whether this issue relates to something that has already been fixed in a later version of the release that it has been raised for.
  • If it's a bug, is it related to a release that we are actively supporting or is it related to a release that's in the end-of-life or security-only phase?
  • We'll replicate the issue to ensure that the problem is as described.
  • We'll decide whether the behavior is an issue or if the behavior is intended.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

Copy link

github-actions bot commented Jan 9, 2024

Hi @jemayn,

We're writing to let you know that we would love some help with this issue. We feel that this issue is ideal to flag for a community member to work on it. Once flagged here, folk looking for issues to work on will know to look at yours. Of course, please feel free work on this yourself ;-). If there are any changes to this status, we'll be sure to let you know.

For more information about issues and states, have a look at this blog post.

Thanks muchly, from your friendly Umbraco GitHub bot :-)

@Zeegaan
Copy link
Member

Zeegaan commented Jan 9, 2024

Hmm I see, I can certainly reproduce this. 🙈
I see we're using the TagService.GetAllContentTags, which in turn uses the TagRepository.GetTagsForEntityType method, should just be about adding another clause to that query in there, selecting only published content.

@AndyButland
Copy link
Contributor

Fixed in #18164

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants