Page MenuHomePhabricator

Removed alias gets displayed again when adding a new one
Closed, ResolvedPublic

Description

We have "Zombie"-Aliases:

  • Add an alias "zombie"
  • Click "save"
  • Remove the "zombie" alias
  • Click "save"
  • Add another alias, e.g. "12345"
  • Click "save"
  • Now the "zombie" alias appears again

Version: unspecified
Severity: normal

Details

Reference
bz42101

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:04 AM
bzimport set Reference to bz42101.
bzimport added a subscriber: Unknown Object (MLST).

Consider that you are always editing the *base* revision - the revision that was current when you loaded the page. So: when you remove the "Zombie" alias, you are removing it from the original revision, which doesn't even have it. This generates an empty patch to be applied to the current/latest revision. So it isn't removed.

I don't see a solution other than maintaining the base revision for every widget, or trying to detect edit conflicts based on the field's previous value instead of using the base revision at all. That could actually be nice, but would need more work. OPen a ticket for that?

I think tracking the baserevid for each widget would be the easiest solution. I
made a new ticket for that: bug 42262

Also fails:

  1. add site link enwiki => Map (all good so far)
  2. add site link eswiki => Mapa (good so far)
  3. click edit => remove of enwiki site link and get an error "The site link could not be removed."

If I reload the page, I can remove the enwiki site link.

yes, in step 3, you are trying to remove the sitelink from the base revision, which does not contain it.

Verified in Wikidata demo time for sprint 24