Page MenuHomePhabricator

No deduplication, weird errors when attempting to edit because of this.
Closed, DeclinedPublic

Description

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

What happens?:
Gives you an error about duplicate object names.

What should have happened instead?:
Duplicate objects should never have been possible in the first place.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information
When attempting to create a function, either my wifi or Wikifunctions messed up, causing 2 of the exact same object to be created. There should be deduplication on these, and the error message should not show up if the issue was not created in the most recent edit.

Event Timeline

Note that the original issue is not the one being created in the steps to recreate, but a bug that is created because of the original bug. Ideally, both of these should be fixed.

Jdforrester-WMF subscribed.

Yup, see https://www.wikifunctions.org/wiki/Special:ListDuplicateObjectNames to cover this – this is possible because MediaWiki is multi-hosted and race conditions can occur if (e.g.) you accidentally double-submit, or there's an odd network issue, or other things.

I agree that potentially we could improve the display in this situation with a big warning banner, though that might be expensive to run before display on each item?

[Please do not bypass the task triage process; all incoming tasks should go into Abstract Wikipedia team as normal, and it's for the team to accept scope or not.]

Jdforrester-WMF changed the subtype of this task from "Bug Report" to "Task".
Jdforrester-WMF moved this task from To Triage to Backlog on the Abstract Wikipedia team board.

I was thinking that if the warning banner would be displayed, the two conflicting objects are checked, and, if they are exactly the same, we delete one of them.

I was thinking that if the warning banner would be displayed, the two conflicting objects are checked, and, if they are exactly the same, we delete one of them.

MediaWiki systems do not auto-delete user-create items; we leave that to humans, as sometimes there might be a good reason. (Why would we both show a banner and check/delete them? Or do you mean one of these?)

Are they physically prevented from doing that? I do agree that machines can fail and most things can be left to humans, but, 2 of the exact same thing being created at the exact same time does not make sense. What I was saying about the banner is that if we find that an object has a label that is the same as another object. If they are different but have the same label, we show an error message. If they are the exact same and have the exact same label, we allow the user edit through and delete the duplicate object.