Page MenuHomePhabricator

An element for adding or editing links is added as a list item that looks like an interlanguage link
Closed, ResolvedPublic

Description

Wikibase client adds an "Add links" or "Edit links" as a list item that pretends to be an interlanguage link itself, even though it isn't.

Beyond being semantically incorrect, this causes several real issues, among them:

  1. Bug 56819 - The bug title is "Do not apply autonym font to non-language links on interlanguage list", but it would be better not to create non-language links in the first place.
  1. Adding a superfluous empty item to pages without interlanguage links in the mobile view, similarly to Bug 57091. For a demo of this issue go to http://en.m.wikipedia.beta.wmflabs.org/wiki/No_language_links and click the "Read in another language" button.

Version: unspecified
Severity: normal
Whiteboard: u=dev c=frontend p=5
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=58102
https://bugzilla.wikimedia.org/show_bug.cgi?id=57091

Details

Reference
bz57094

Event Timeline

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

(In reply to comment #0)

Wikibase client adds an "Add links" or "Edit links" as a list item that
pretends to be an interlanguage link itself, even though it isn't.

Could you elaborate what you mean by "it pretends", as it's a different HTML class, and visually it's differently text-align'ed and has a small symbol in front of it?

(In reply to comment #1)

Could you elaborate what you mean by "it pretends", as it's a different HTML
class, and visually it's differently text-align'ed and has a small symbol in
front of it?

It's different visually, but it's an <li> element in the same <ul> list. It does have a different class, but it's still semantically incorrect, because it's not really a member of the list.

The actual links don't have a common class either, but different classes by language. It's not really great, but it probably shouldn't be changed lightly, because it was used like this for very long. I kinda addressed this in https://gerrit.wikimedia.org/r/#/c/94899/ , but it doesn't really solve the problem, because the interlanguage class will probably be added to the extra Wikidata item, too. (I couldn't actually test it, because I couldn't yet get my Wikidata installation to display links. Configuring Wikibase is surprisingly tricky.)

  • Bug 57367 has been marked as a duplicate of this bug. ***

Note this causes mobile to render a languages section on pages which have no alternate language versions.

I see this has been backlogged. Please note that mobile have had to hack around this bug in the meantime but the solution to do that is very very nasty and should be removed asap. From our perspective this is a quite important bug for us to get fixed as a slight change in Wikibase's code could lead to confusing behaviour with regards to languages for users.

I understand. That's why it is in the backlog now. (As opposed to pre-backlog.)

Ah ok great! It's just in mobile 'backlog' tends to mean the place where cards go to and don't get worked on forever/a long time :)

  • Bug 58102 has been marked as a duplicate of this bug. ***

This is now effecting mobile users on all wikipedias who are told that a page is available in 1 other language which is not a language.

See bug 57094 for details.

probably we need something like SkinTemplateToolboxEnd for languages, but for putting stuff after the <ul>

any suggestions on how best to do that would be welcome

Change 99693 had a related patch set uploaded by Jdlrobson:
Override language_urls template data to avoid hook abuse

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

  • Bug 58102 has been marked as a duplicate of this bug. ***

Change 99693 merged by jenkins-bot:
Override language_urls template data to avoid hook abuse

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

Setting this back to assigned to get the real fix done in Wikibase.

Change 101895 had a related patch set uploaded by Aude:
Add SkinTemplateAfterLanguages hook to add html after language links

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

Change 101895 merged by Jdlrobson:
Add BaseTemplateAfterPortlet hook to add html after portlets

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

Change 118292 had a related patch set uploaded by Aude:
Use BaseTemplateAfterPortlet hook to add "edit / add links" link

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

Change 118292 merged by jenkins-bot:
Use BaseTemplateAfterPortlet hook to add "edit/add links" link.

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