Wikidata/Development/Entity redirect after merge
This page is currently a draft. More information pertaining to this may be available on the talk page. Translation admins: Normally, drafts should not be marked for translation. |
When a user merges an item at Wikidata using the merge api feature or the special page coming, the old page that got merged should turn into a redirect linking to the target item. This should maybe also be possible with properties.
Use cases
[edit]- Steps of merging
- User recognizes that two items are about the same topic and should be merged.
- Two item ids are given to the api or the special page (from and to)
- After all sitelinks, statements etc. got merged, the from item should be turned into a redirect pointing to the to item.
- The history of the from item could either be also merged into the to item's history (this sounds really hard and crazy) or, maybe the better approach, it could stay in the from item. This would make unmerging easier and also makes sense if we can still access a redirect's history.
- Steps of visiting a redirect
- the user sees the content of the target item
- a notice is shown that the user was redirected (as in normal MediaWiki redirects)
- Steps of unmerging
- when two items need to get unmerged (vandalism, user's mistake, ...) it is currently very hard to undo the merge. First, an admin has to undelete the old item, then the target item has to be reverted and after that the old item
- if one entity was a redirect, it should only be one edit to undo a merge that was done via the api (not sure if this is possible)
- How to handle statements pointing to a redirect
- if a redirecting entity is used as a statement datavalue, it should be handled as if it was the target item (same label etc.)
- api modules etc. have to decide whether to give the old or the target entity id as value
Technical notes
[edit]There are several models how redirects should be handled on the technical side:mainly quoted from Daniel's mail
Description | Support | Contra |
---|---|---|
Implement redirects as a "mode" Entities may have. |
|
|
Implement redirects as a "mode" any EntityContent may have |
|
|
Use a separate entity type for representing redirects: a RedirectContent points to an EntityContent |
|
|
make redirects a special type of Entity, besides Item and Property; differentiate between Entity and LabeledEntity |
|
|
Perhaps only the options #2 and maybe #4 will be taken in consideration. Option #2 is the one that will be implemented.