Page MenuHomePhabricator

If a user tries to place two of the same tag, should show a warning or silently delete one tag
Closed, ResolvedPublicBUG REPORT

Description

Reported by @Wbm1058 at https://en.wikipedia.org/w/index.php?title=Wikipedia:Page_Curation/Suggested_improvements&diff=prev&oldid=1173447601

Steps to replicate the issue (include links if applicable):

  • Visit a mainspace article
  • Be a patroller
  • In Page Curation toolbar, open maintenance tag menu
  • tick a tag in the "All" menu
  • tick the same tag in a submenu

What happens?:

  • writes two tags

What should have happened instead?:

  • should only write one tag
  • or should warn the user and prevent submission. not sure which yet. up to whoever writes the patch. the former would probably be easier to code

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

This might be a side effect of the fix at T332105 since there appears to be code that tries to resolve duplicates :(

Change 954400 had a related patch set uploaded (by Sohom Datta; author: Sohom Datta):

[mediawiki/extensions/PageTriage@master] Fix tag de-duplication and synchronization functionality

https://gerrit.wikimedia.org/r/954400

Change 954400 merged by jenkins-bot:

[mediawiki/extensions/PageTriage@master] Fix tag de-duplication and synchronization functionality

https://gerrit.wikimedia.org/r/954400

This works fine locally, I wonder if there is some stuff that might be specific to enwiki that might be tripping this up :(

Also, @MPGuy2824 can you let me know if the 'All tags' column works fine on en-wiki (More footnotes is from the 'common' column AFAIR) ?

Change 959963 had a related patch set uploaded (by Sohom Datta; author: Sohom Datta):

[mediawiki/extensions/PageTriage@master] Make sure different key values are handled while submitting

https://gerrit.wikimedia.org/r/959963

Also, @MPGuy2824 can you let me know if the 'All tags' column works fine on en-wiki (More footnotes is from the 'common' column AFAIR) ?

I had added the "no footnotes" tag from the "All tags" section. The other (duplicate) tag was selected automatically.

Change 959986 had a related patch set uploaded (by Sohom Datta; author: Sohom Datta):

[mediawiki/extensions/PageTriage@wmf/1.41.0-wmf.27] Make sure different key values are handled while submitting

https://gerrit.wikimedia.org/r/959986

Test wiki created on Patch demo by MPGuy2824 using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/63f1607241/w

Also, @MPGuy2824 can you let me know if the 'All tags' column works fine on en-wiki (More footnotes is from the 'common' column AFAIR) ?

I had added the "no footnotes" tag from the "All tags" section. The other (duplicate) tag was selected automatically.

Yeah, I just tested this, looks like my fix had the unintentional effect of always adding duplicates :( (I had assumed that the deduplication code in T345496#9138850 was robust enough, turns out it had a edge case that it was not checking for)

MPGuy2824 changed the task status from Open to In Progress.Sep 22 2023, 9:43 AM
MPGuy2824 assigned this task to Soda.
MPGuy2824 triaged this task as Unbreak Now! priority.
MPGuy2824 moved this task from Priority bugs to Code Review on the PageTriage board.

Change 959963 merged by jenkins-bot:

[mediawiki/extensions/PageTriage@master] Make sure different key values are handled while submitting

https://gerrit.wikimedia.org/r/959963

I've scheduled this to deploy on Monday 9:00-10:00 CEST which appears to be the first deploy window available

Change 959986 merged by jenkins-bot:

[mediawiki/extensions/PageTriage@wmf/1.41.0-wmf.27] Make sure different key values are handled while submitting

https://gerrit.wikimedia.org/r/959986

Mentioned in SAL (#wikimedia-operations) [2023-09-25T07:16:30Z] <taavi@deploy2002> Started scap: Backport for [[gerrit:959986|Make sure different key values are handled while submitting (T345496)]]

Mentioned in SAL (#wikimedia-operations) [2023-09-25T07:29:25Z] <taavi@deploy2002> taavi and soda: Backport for [[gerrit:959986|Make sure different key values are handled while submitting (T345496)]] synced to the testservers mwdebug1001.eqiad.wmnet, mwdebug2002.codfw.wmnet, mwdebug1002.eqiad.wmnet, mwdebug2001.codfw.wmnet, and mw-debug kubernetes deployment (accessible via k8s-experimental XWD option)

Mentioned in SAL (#wikimedia-operations) [2023-09-25T07:47:26Z] <taavi@deploy2002> Finished scap: Backport for [[gerrit:959986|Make sure different key values are handled while submitting (T345496)]] (duration: 30m 55s)

This issue should be fixed as of today morning (8:00 UTC) :) Thanks to @MPGuy2824 for helping test the fix for the bug :)

Test wiki on Patch demo by MPGuy2824 using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/63f1607241/w/