Page MenuHomePhabricator

[Bug] Display error in the TreeMap when embedded
Closed, ResolvedPublic


When a query viewed in TreeMap is displayed via embed.html, some problems occurs: both background color and text color are white, so the text can't be read, and other minor css problems. When displayed in the query page, no bug occurs.

Example of a query

Same example embedded

Tested on Firefox 52.0 and Chromium with same results.

Possible cause: embed.html and the main query service page doesn't use exactly the same CSS and JS. In the main page, the graph is included in a div with attributes

id="query-result" style="display: block;"

In the embed page, this div has only


Modifying DOM and the attributes makes embed.html displaying the graph correctly.


Related Gerrit Patches:

Event Timeline

Restricted Application added projects: Wikidata, Discovery. · View Herald TranscriptMar 13 2017, 9:18 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Envlh added a subscriber: Envlh.Mar 13 2017, 11:38 AM

Change 342546 had a related patch set uploaded (by EdouardHue):
[wikidata/query/gui] Using same result div id in embed as main page

Just submitted a patch. Changing div id was just a workaround, a little more hacking seems necessary.

Jonas closed this task as Resolved.Mar 14 2017, 9:38 AM
Jonas moved this task from Proposed to Done on the Wikidata-Former-Sprint-Board board.

Change 342546 merged by jenkins-bot:
[wikidata/query/gui] Using same result div id in embed as main page