Page MenuHomePhabricator

[Story] Redirects - Ability to create a redirect over a deleted entity
Closed, ResolvedPublic

Description

Using the delete reasons in the delete log we can determine where roughly half of all deleted items should redirect to.
It would be great to be able to add these redirects.

To do this we would need to be able to create a redirect over a deleted item, one should also be able to create a redirect over an empty item!

Event Timeline

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

Realistically it is easier to undelete the item and turn it into a redirect I fear before we get to this.

Many items can not be undeleted as they will have conflicting descriptions and labels or sitelinks

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).

12:44 PM <addshore> DanielK_WMDE_ / anyone that knows / once redirects are made can they be changed?
1:17 PM <DanielK_WMDE_> addshore: yes, they can.
1:18 PM <DanielK_WMDE_> addshore: a redirect can be created on top of an empty entity, or an existing redirect

This task now only applies creating redirects over deleted entities

Bugreporter renamed this task from Redirects - Ability to create a redirect over a deleted or empty entity to Redirects - Ability to create a redirect over a deleted entity.Apr 25 2015, 2:21 PM

So just a note, this is a blocker meaning that 6000 items that have been merged (since the beginning) can not be un-deleted and redirected

This should be easy enough to implement:

  • in RedirectCreationInteractor, rename checkEmpty() to checkCanOVerride()
  • in checkCanOVerride(), use an EntityTitleLookup to get the entity's Title object.
  • if Title::isDeleted returns true, it's ok to create the redirect, so checkCanOVerride should return normally.

For testing, it's probably best to use a mock Title returned from the mock EntityTitleLookup, so no actual page needs to be created and deleted.

Lydia_Pintscher renamed this task from Redirects - Ability to create a redirect over a deleted entity to [Story] Redirects - Ability to create a redirect over a deleted entity.Sep 7 2015, 1:01 PM
Lydia_Pintscher updated the task description. (Show Details)

Change 257003 had a related patch set uploaded (by Addshore):
Enable creation of redirects over deleted entities

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

Change 257003 merged by jenkins-bot:
Enable creation of redirects over deleted entities

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

I have just created a redirect from deleted entity Q7903464. I suppose this is resolved now.