Page MenuHomePhabricator

"Unable to display result" error in Wikdiata Query Service graphs, only when embedded
Closed, ResolvedPublic

Description

In Scholia pages like
https://tools.wmflabs.org/scholia/topic/Q668 ,
the Co-author graph and the Co-occurring topics graph currently give this error when embedded in Scholia or elsewhere, despite working fine when run separately via the "Edit this query" link or via the "Short link to results".

Seems possibly related to https://phabricator.wikimedia.org/T194735 and maybe https://phabricator.wikimedia.org/T144468 .
Originally reported at https://github.com/fnielsen/scholia/issues/441 .

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

The problem seems to affect graphs in general, not just the two types mentioned above. Other examples are the Co-author graph and Academic tree graphs in author profiles, e.g. https://tools.wmflabs.org/scholia/author/Q8219 .

Change 448038 had a related patch set uploaded (by Prssanna; owner: Prssanna):
[wikidata/query/gui@master] Fix for graph result not being displayed in an iframe

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

Change 448038 merged by jenkins-bot:
[wikidata/query/gui@master] Fix for graph result not being displayed in an iframe

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

Change 449099 had a related patch set uploaded (by WDQSGuiBuilder; owner: WDQSGuiBuilder):
[wikidata/query/gui-deploy@production] Merging from fd394e824b7f22220a60b2366155ba582b577721:

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

Change 449099 merged by Smalyshev:
[wikidata/query/gui-deploy@production] Merging from fd394e824b7f22220a60b2366155ba582b577721:

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

@Daniel_Mietchen you should add the attributes referrerpolicy="origin" and sandbox="allow-scripts allow-same-origin allow-popups" to your iframe code

Example from our code dialog:

<iframe style="width: 80vw; height: 50vh; border: none;" src="./embed.html##Cats
SELECT ?item ?itemLabel 
WHERE 
{
  ?item wdt:P31 wd:Q146.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}" referrerpolicy="origin" sandbox="allow-scripts allow-same-origin allow-popups"></iframe>