Topic on Project:Support desk

Jump to navigation Jump to search

[RESOLVED] Widget:Google Spreadsheet fails

8
EFFemeer (talkcontribs)

Note In order to keep my wiki up to date, I now embedded the most important sheets with the Iframe widget. Still convinced that Widget:Google Spreadsheet isn't working properly.


All the sudden my Widget:Google Spreadsheet (such as http://drebbel.net/wiki/Test:Nowadays) started to fail with a Refused to display 'https://spreadsheets.google.com/...' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'. message. This is the sheet. (published and shared anyone with the link) Widget:Google Document however works fine ... Published everything the same way.

  • Manual:$wgBreakFrames
  • Manual:$wgApiFrameOptions and similar

don't change anything.

My site is drebbel.net/wiki

Product Version
MediaWiki 1.24.1
PHP 5.3.28 (apache2handler)
MySQL 5.0.95

Any idea?

Thanks in advance.

Ciencia Al Poder (talkcontribs)

I don't know if changed anything, but I see that the chart displays correctly on the page, without error now.

EFFemeer (talkcontribs)

Dear Ciencia, in order to keep my wiki upto date I altered the most important sheet using the Iframe Widget.

Please look at http://drebbel.net/wiki/Test:Nowadays to see a failing sheet.

Ciencia Al Poder (talkcontribs)

The problem isn't your MediaWiki installation.

Manual:$wgBreakFrames and Manual:$wgApiFrameOptions etc won't help you, since that controls whether to allow your wiki to be inserted inside another page in a frame. But this is different. That's about inserting google spreadsheets inside your MediaWiki.

If you take a closer look, you'll see that your iframe widget is using one URL for the spreadsheet, while the google spreadsheet widget is using a different one. Editing how it constructs the URL in so it's the same as the iframe that works would solve the issue.

EFFemeer (talkcontribs)

Thank you for this hint Ciencia. I'll try to modify the URL.

However I don't understand why the widget has been working properly for several weeks and then all the sudden stopped.

EFFemeer (talkcontribs)

Thank you Ciencia. Your hint made the widget work. Could you ask the responsibles to change the code?


For all those who might encounter the same problem:

1) Download the latest version of the Widget at: http://wiki.glitchdata.com/index.php?title=Widget:Google_Spreadsheet&action=edit

2) Replace <iframe> .... </iframe> by:

<iframe src="<!--{$url|validate:url}-->" frameborder="<!--{$border|validate:int|default:0}-->" width="<!--{$width|escape:html|default:400}-->" height="<!--{$height|escape:html|default:300}-->"></iframe>


3) include the widget with:

{{#widget:Google Spreadsheet |
url=https://docs.google.com/spreadsheets/d/ Google Sheet code/pubhtml |
width=200 |
height=350 }}


Don't forget to remove the compiled widget code!

Ciencia Al Poder (talkcontribs)

Note that the repository of widgets seems to be , which has a different syntax.

217.123.55.84 (talkcontribs)

Which adds to the confusion, as that page says:


* Since Google Docs migrated to Google Drive, the reference for the template code has change. The latest is available [http://wiki.glitchdata.com/index.php?title=Widget:Google_Spreadsheet here].

Reply to "[RESOLVED] Widget:Google Spreadsheet fails"