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.)
If appropriate, enter the URL of a page where the problem can be seen:
http://test.archiveofourown.org/tag_sets/new (as a logged in user)
http://test.archiveofourown.org/tag_sets/332 (as testy)
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:
http://test.archiveofourown.org/tag_sets/new should only show the canonical warnings
http://test.archiveofourown.org/tag_sets/332 should show the canonical warnings in the Warnings section and anything else as Freeforms/Additional Tags
http://test.archiveofourown.org/works/1060930 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
http://test.archiveofourown.org/collections/noncanonical_warnings/prompts/new should only list the canonical Archive Warning tags
http://test.archiveofourown.org/collections/noncanonical_warnings/signups/14129 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
1. http://test.archiveofourown.org/tag_sets/new shows only the 6 canonical warnings.
2. http://test.archiveofourown.org/tag_sets/332 (as testy) still shows non-canonical warnings in the Warnings section. The section is cached at https://github.com/otwcode/otwarchive/blob/f0a35415338b6499caf5f71d777cc7c867c3d073/app/views/owned_tag_sets/show.html.erb#L54-L58.
3. http://test.archiveofourown.org/works/1060930 has "not!a!warning!" as an Additional Tag, "Creator Chose Not To Use Archive Warnings" as the warning, in the meta and blurb.
4. http://test.archiveofourown.org/collections/noncanonical_warnings/prompts/new only lists the 6 canonical Archive Warning tags.
5. http://test.archiveofourown.org/collections/noncanonical_warnings/signups/14129 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."
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."
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.)
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.
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.