Clean up non-canonical warning tags


Originally reported on Google Code with ID 4284
What archive revision are you testing on? (See the version label in
the footer, for example v0.8.13.8.)
otwarchive test-

If appropriate, enter the URL of a page where the problem can be seen:

  1. (as a logged in user)

  2. (as testy)


  4. (logged

  5. (as

What happens

Look at the pages and notice there are warnings other than the canonical warnings (canonical warnings are Choose Not To Use Archive Warnings, Graphic Depictions Of Violence, Major Character Death, No Archive Warnings Apply, Rape/Non-Con, Underage).

What should happen

Expected output once the rake task runs:

  1. should only show the canonical warnings

  2. should show the canonical warnings in the Warnings section and anything else as Freeforms/Additional Tags

  3. should have "not!a!warning!" as an Additional Tag in both the meta and the blurb, and it should have "Creator Chose Not To Use Archive Warnings" as the warning in the meta and blurb

  4. should only list the canonical Archive Warning tags

  5. should have "not!a!warning!" as freeforms, and the prompt/sign-up should be editable once the moderator of the challenge edits the Challenge Settings to allow Additional/Freeform tags


August 9, 2020, 4:07 AM

1. shows only the 6 canonical warnings.
2. (as testy) still shows non-canonical warnings in the Warnings section. The section is cached at
3. has "not!a!warning!" as an Additional Tag, "Creator Chose Not To Use Archive Warnings" as the warning, in the meta and blurb.
4. only lists the 6 canonical Archive Warning tags.
5. has "not!a!warning!" as freeforms (not bolded, list item has CSS class "freeforms"). However, the moderator of the challenge cannot edit the Challenge Settings to allow Additional/Freeform tags, because "Prompts have been added so these settings can no longer be changed."

August 11, 2020, 6:01 PM

1. confirmed that only the 6 canonical warnings are shown
2. non-canonical tags were still appearing under Warnings (10) but when i edited and updated the tag set to add testy2 as an owner and view it from that account, it caused only the six canonical warnings to appear under Warnings (6) and for the four additional tags to appear under Additional Tags (4) even when logged in as testy. tldr it looks good now.
3. confirmed that it's displaying as expected now
4. confirmed that it lists only the 6 canonical warnings
5. +1 to red's comment. challenge settings cannot be edited to allow additional/freeform tags, and a notice appears above the greyed out section, "Prompts have been added so these settings can no longer be changed."

August 14, 2020, 8:53 AM

We decided to do the brute force cache cleaning and Support volunteered to deal with any tickets from mods who were actually using these tags in their open challenges. (It looked like there were 13 challenges at most.)

August 14, 2020, 9:12 AM

james_ and I ran bundle exec rake Tag:convert_non_canonical_warnings_to_freeforms on production.

In a couple cases, we had ArchiveWarning tags that could not be converted because a Freeform with the - Freeform suffix already existed. This happened with Wincest (note the leading space) and it was necessary to use the Rails console to replace the suffix’s dash with an em dash (making the converted tag Wincest – Freeform), per Tag Wrangling procedure. (If the em dash version already exists, Tag Wrangling’s next resort is an en dash.)

Also in a few cases, we had tags that couldn’t be converted because the ArchiveWarning had a leading space and there was a Freeformwith the same name and no leading space. This happened with the warning sexual situation (with leading space), since the freeform sexual situation (without leading space) already existed. In this case, we used the Rails console to add the regular - Freeform suffix to the warning tag before rerunning the rake task.

August 15, 2020, 1:44 AM

Having the task to clean up spaces in tag names would have been useful in this case: AO3-5964. We should do that at the same time as cleaning up non-canonical categories and ratings: AO3-5988.

We also need to delete unused tags left over:

although this task is scheduled to run daily, so we're good.







Tag Sets



Affects versions

Fix versions






Internal 0.9

Google Code Issue ID