Page MenuHomePhabricator

Show Labels from redirected Languages/LexicalCategories?
Closed, ResolvedPublic

Description

Problem: Currently, if a Special:NewLexemeAlpha form (affects the legacy form as well) is prefilled from the URL, redirects for the Language and Lexical Category Items are not resolved, but instead the ID is shown.

Should we change that? (This probably needs to be answered by @Lydia_Pintscher)

Example link:https://wikidata.beta.wmflabs.org/wiki/Special:NewLexemeAlpha?lemma=Weiterleitungsbeispiel&lexeme-language=Q8&lexicalcategory=Q611788&lemma-language=de

The advantage of the current solution is that users maybe notice that their link is outdated and maybe fix it by replacing the redirected ID with the id of the redirect target.
The disadvantage of the current solution is that they only see the Q-ID of the redirected Item in the form.

Notes

Event Timeline

Yeah I think we can show the label of the redirect target here.

The search results for merged items will only show the item ID, though, and I think this would be pretty hard to change:

image.png (119×726 px, 6 KB)

So this will be inconsistent between when the item is loaded via the URL vs. selected interactively.

The search results for merged items will only show the item ID, though, and I think this would be pretty hard to change:

Hm, nevermind – if we use the new FallbackLabelDescriptionLookupFactory in the ENTITY_SEARCH_CALLBACK entity type wiring (which would be part of T312223), then wbsearchentities starts returning labels for search results that belong to redirected items. (Though I’m pretty sure it doesn’t affect which items get returned in the first place, and that redirected items are only returned if you search for their item ID.) Is that something we want or not?

The search results for merged items will only show the item ID, though, and I think this would be pretty hard to change:

Hm, nevermind – if we use the new FallbackLabelDescriptionLookupFactory in the ENTITY_SEARCH_CALLBACK entity type wiring (which would be part of T312223), then wbsearchentities starts returning labels for search results that belong to redirected items. (Though I’m pretty sure it doesn’t affect which items get returned in the first place, and that redirected items are only returned if you search for their item ID.) Is that something we want or not?

I feel this is something we would want for Special:NewLexeme, but we can probably only have it everywhere or nowhere. And I think this is another product question for @Lydia_Pintscher whether we want it everywhere?

(I tried it out locally, and it works as Lucas suggests)

Change 812244 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/WikibaseLexeme@master] Use FallbackLabelDescriptionLookupFactory in SpecialNewLexemeAlpha

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

Change 812871 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/WikibaseLexeme@master] Use FallbackLabelDescriptionLookupFactory in SpecialNewLexeme

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

Change 812871 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Use FallbackLabelDescriptionLookupFactory in SpecialNewLexeme

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

Change 812244 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Use FallbackLabelDescriptionLookupFactory in SpecialNewLexemeAlpha

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

Lucas_Werkmeister_WMDE claimed this task.

Alright, I think we can call this done.