Decanonizing a tag without first removing its metatags does not remove the formerly canonical tag's works or bookmarks from the metatag's listings

Description

  1. Log in as a wrangler

  2. On the New Tag page, create a canonical tag and remember its type, e.g. Meta Character Tag 1. This will be your meta tag.

  3. Post a work with another tag of the same type, e.g. Sub Character Tag 1. This will be your sub tag.

  4. From the edit page for Sub Character Tag 1, canonize the tag

  5. Again from the edit page for Sub Character Tag 1, add Meta Character Tag 1 as a meta tag

  6. Bookmark the work you posted earlier

  7. Wait a few minutes

  8. Yay, both the work and the bookmark appear on Meta Character Tag 1's work and bookmark listings

  9. From the edit page for Sub Character Tag 1, decanonize the tag

  10. Wait a while

What happens:
Uh oh, the work and bookmark still appear on Meta Character Tag 1's work and bookmark listings

What should happen instead:
The work and bookmark should be removed from those listings.

Testing notes:

It wouldn't hurt to test bookmarks of works, series, and external works. Definitely check that a work/bookmark does not get removed from the tag listing if it is also tagged with Meta Character Tag 1 or another tag that is subbed to Meta Character Tag 1.

Also, make sure to test this with the “Make tag non-canonical and unhook all associations” option as well. You’ll have to be logged in as an admin to use that.

Coding notes:
This happens because decanonizing a tag does not remove any filter taggings it inherited from meta tags.

This is the work when both Sub Character Tag 1 and Meta Character Tag 1 are canonical:

The filter tagging with filter_id 1218470 is Sub Character Tag 1. The inherited filter tagging with filter_id 1218467 is Meta Character Tag 1.

This is the work when Sub Character Tag 1 has been decanonized:

Note that the filter tagging with filter_id 1218470 (Sub Character Tag 1) is gone, but the meta tag's filter tagging remains.

Please refer to tickinginstant’s comment about the “Make tag non-canonical and unhook all associations” option for information on potential race conditions when using that option.

Activity

Show:
lydia-theda
May 11, 2020, 10:59 PM
  1. Created canonical character tags “Char Meta” and “Char Sub 1” and made Char Meta the metatag of Char Sub 1.

  2. Edited existing Work 1, added the character tag “Char Sub 1”

  3. Posted new Work 2, with the character tag “Char Sub 2”

  4. Made Work 1 and Work 2 into Series 1 (tagged with Char Sub 1 and Char Sub 2)

  5. Created external Work 3, with the character tags “Char Meta” and “Char Sub 2”

  6. Created external Work 4, with the character tag “Char Sub 2”

  7. Edited existing Work 5, added the character tag “Char Sub 2”

  8. Made Work 5 into Series 2 (tagged with Char Sub 2)

  9. Bookmarked Work 1, Work 2, Series 1, Series 2

  10. Edited “Char Sub 2” to be canonical and subtagged to “Char Meta”

  11. Checked works page for Char Meta: shows Work 1, Work 2, Work 5 (10 minutes)

  12. Checked bookmarks page for Char Meta: shows Work 1, Work 2, ExWork 3, ExWork 4, Series 1, Series 2

  13. Decanonized Char Sub 2. (Also had the issue where Char Meta appeared to still be in the metatag field before refreshing)

  14. Checked works page for Char Meta: shows Work 1 only (10 minutes)

  15. Checked bookmarks page for Char Meta: shows Work 1, ExWork 3, Series 1

Looks good! Will still need someone to do the admin decanonizing test, though.

Tag Wrangler Chairs
May 12, 2020, 11:07 AM

Qem:

Did the admin decanonising test on two tags, Odd Future and BossHoss.

Confirmed that BossHoss no longer appears in music RPF.

Confirmed that Odd Future and the former Odd Future synns, tyler the creator - Fandom, and OFWGK†Δ no longer appears in either hip hop rpf or hip hop’s metatag music rpf; (but the other work which had other relevant tags do).

Chelsea Eidbo
May 16, 2020, 7:12 PM
Edited
  1. Made New Canon and made fic with canon to sub in Additional Tags.

  2. Work and bookmark both appeared.

  3. Decanonizing

  4. Work and bookmark disappeared instantly
    Followup Test:

  5. Tested with an older additional tag on same new meta tag. The older tag had four works and I bookmarked one of them.

  6. Uh...Might be a new issue. So far the bookmark shows up fine but the only work showing up is the one I bookmarked.

  7. After 10-ish minutes, the other three appeared in works. A second bookmark appeared as well.

  8. Resuming canonical test by decanonizing the sub tag

  9. Works and Bookmarks disappeared within five minutes.

No problems other than a slightly sluggish response from three works in the followup test.

Second Followup Test
Followup Test:

  1. Made New Canon and made fic with canon to sub in Relationships because I want to see what happens with Char tags in the mix.

  2. Added Character Tags to sub tag.

  3. Work and bookmark both appeared.

  4. Decanonizing without removing Character Tags at 1:48 AM UTC-5

  5. Work and bookmark disappeared by 2:04 AM UTC-5

No issues

redsummernight
May 24, 2020, 2:44 AM

Re: teyla,

This seems to work now, except for the issue that the metatag doesn’t disappear from the subtag’s edit page after decanonizing without a manual reload. Maybe worth putting into a different ticket, though.

This is fixed in https://github.com/otwcode/otwarchive/pull/3824. ticking instant made removing associations synchronous:

In the current code, when you check the box to remove a metatag, it doesn't immediately remove the metatag. Instead, it queues up a job to remove the metatag. This means that the metatag remains on the edit page until the user refreshes (or, if the utilities queue is long, after the the queue has finished running and the user refreshes). This PR makes the action synchronous, and modifies the remove_association function to ensure that removing the association is a fast operation.

redsummernight
May 24, 2020, 3:11 AM
Edited

Second test for the admin option "Make tag non-canonical and unhook all associations".

  • Found an existing canonical character tag: https://test.archiveofourown.org/tags/Rei.

  • Edited a work to add new character tag "Rei (5432)".

  • Canonized "Rei (5432)" and added "Rei" as its metatag.

  • Bookmarked the earlier work. <1m later, the work and the bookmark showed up in listings for "Rei".

  • As an admin, "Make tag non-canonical and unhook all associations" did not appear on on "Rei (5432)", because the tag has no mergers or children. Edited a throwaway work to add relationship "Rei (5432)/Asuka" (left non-canonical). Made "Rei (5432)/Asuka" a child relationship of "Rei (5432)".

  • As an admin, used "Make tag non-canonical and unhook all associations" on "Rei (5432)".

    • Note: right after using "Make tag non-canonical and unhook all associations", the response page still showed metatag "Rei" on the edit page for "Rei (5432)". Immediately reloaded and it went away, though.

  • <5m later, the work and the bookmark disappeared from listings for "Rei".

Looks good.

Assignee

ticking instant

Reporter

Sarken

Roadmap

Tag Wrangling

Priority

Medium

Affects versions

Fix versions

Components

BackEnd

Difficulty

Medium

Required Access Level

Tag Wrangler

Milestone

Internal 0.9
Configure