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#%23Cats%0ASELECT%20%3Fitem%20%3FitemLabel%20%0AWHERE%20%0A%7B%0A%20%20%3Fitem%20wdt%3AP31%20wd%3AQ146.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D" referrerpolicy="origin" sandbox="allow-scripts allow-same-origin allow-popups"></iframe>