Page MenuHomePhabricator

Infobox template parameters showing in Hovercard
Closed, ResolvedPublic

Description

A hovercard for a link to https://de.wikipedia.org/wiki/University_of_Cambridge currently just shows 2 parameters (unused) in the infobox.

You can test it at (3rd paragraph) https://de.wikipedia.org/wiki/Douglas_Adams#Leben

Hovering over the link for University of Cambridge shows "Vorlage:Infobox Hochschule/Mitarbeiter fehlt"

Event Timeline

Quiddity created this task.Aug 21 2015, 5:39 PM
Quiddity raised the priority of this task from to Needs Triage.
Quiddity updated the task description. (Show Details)
Quiddity added a subscriber: Quiddity.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 21 2015, 5:39 PM
Mirer added a subscriber: Mirer.Aug 21 2015, 6:29 PM
Jdlrobson triaged this task as Low priority.Sep 18 2015, 8:18 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson set Security to None.
Krinkle added a subscriber: Krinkle.Nov 5 2015, 4:21 AM

This is because the German Wikipedia template "Infobox Hochschule" explicitly outputs weird invisible text as part of the wiki page. Whatever this is for, I don't think it's reasonable to expect this kind of hack to be supported.

<div id="mw-content-text" lang="de" ...>
 <p>
  <span style="display: none;"><a href="/..redlink=1">Vorlage:Infobox Hochschule/Mitarbeiter fehlt</a></span>
  <span style="display: none;"><a href="/..redlink=1">Vorlage:Infobox Hochschule/Professoren fehlt</a></span>
 </p>
<table .. summary="Infobox Hochschule">
  ..
 </table>
<p>Die <b>University of Cambridge</b>.. im Vereinigten Königreich..
Savh added a subscriber: Savh.Nov 5 2015, 6:55 PM

If I understand it correctly, the infobox "does not show" a link to various templates ([[Vorlage:Infobox Hochschule/Mitarbeiter fehlt]], [[Vorlage:Infobox Hochschule/Logo fehlt]]), possibly as a way to track the pages with missing data through WhatLinksHere.

Would replacing those templates with (hidden) categories solve this issue, or are categories also shown in the hovercards?

If I understand it correctly, the infobox "does not show" a link to various templates ([[Vorlage:Infobox Hochschule/Mitarbeiter fehlt]], [[Vorlage:Infobox Hochschule/Logo fehlt]]), possibly as a way to track the pages with missing data through WhatLinksHere.
Would replacing those templates with (hidden) categories solve this issue, or are categories also shown in the hovercards?

Yes, it would solve the issue. This isn't really an issue with Hovercards, it's an issue with the template code outputting stuff badly. Hidden categories are probably better practice for static error strings. For dynamic ones, adding class="error" to each of the spans would also solve the problem (since TextExtracts ignores that class). I've recently solved a few instances of the latter that way on English Wikipedia.

Hovercards can't deal with badly-formatted pages, and that's not a bug. In some cases, the pages, rather than the code, ought to be fixed. I know I've done my share fixing hundreds of pages with non-standard hatnotes (using :'' instead of {{about}} and such), which also produce bad Hovercard output.

phuedx closed this task as Resolved.Dec 1 2016, 10:13 AM
phuedx claimed this task.
phuedx added a subscriber: phuedx.