Page MenuHomePhabricator

de.wikipedia.org prefixes geocoordinates for some articles using api interface
Closed, InvalidPublic

Description

Hi,

since a couple of days some articles extracts prefixing geocoordinates, see e.g.

https://de.wikipedia.org/w/api.php?action=query&pageids=6870431&prop=info|extracts|coordinates|pageimages&coprop=type|name|dim&inprop=url&exchars=500&exsectionformat=plain&explaintext&continue=&format=json&pithumbsize=400

I can't really say when this started, as it was also reported to me... So far noticed it only on de.wikipedia.org (not any other languages) and also only on some articles...
Couldn't find any logic in there..

Nevertheless i wanted to let you know..

Event Timeline

I said it might be (it was a recent change modifying a related template's coordinate handling), not that it necessarily is.

This looks like the same root problem as in T119702: API returns error messages in place destined for end user: the template is outputting the coordinates inside a <span> with style="display:none", but TextExtracts does not ignore such spans.

<span class="geo" style="display:none"><span class="latitude">49.115833333333</span><span class="longitude">10.3225</span><span class="elevation">481</span></span>
Jdlrobson triaged this task as Medium priority.Apr 6 2016, 5:12 PM

TextExtracts should also ignore style=display:none

I agree, but besides that, the way dewiki's coordinates template ([[de:Template:Coordinate]]) inserts microformat data into the page is totally broken, which also caused T91491 (actually my insertion of style="display:none" to the template was an attempt to fix that, rendering class="noprint" redundant under my assumptions).

The geo microformat is not at all supposed to be implemented as an invisible element, but rather as attributes of visible elements. This should be addressed in the local template (but I am not going to work on it).

bmansurov lowered the priority of this task from Medium to Low.Jul 27 2016, 4:52 PM
bmansurov moved this task from Incoming to Needs Prioritization on the Web-Team-Backlog board.

Hello! Is this still the case?
I'm a little confused with this bug - what needs fixing and where?

Not clear how to replicate and seems like the noprint
With regards to https://phabricator.wikimedia.org/T131923#2187910 the appropriate solution to not showing coordinates in extracts is to add the class noexercpt (see https://www.mediawiki.org/wiki/Extension:TextExtracts#How_can_I_remove_content_from_a_page_preview.2Fextract.3F).