Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

XHR cross origin failure when initializing tabletop with a query #70

Closed
ghost opened this issue Dec 21, 2014 · 10 comments
Closed

XHR cross origin failure when initializing tabletop with a query #70

ghost opened this issue Dec 21, 2014 · 10 comments

Comments

@ghost
Copy link

ghost commented Dec 21, 2014

initialization such as:

Tabletop.init({
    key: "ABCD",
    query: "select B, C",
    simpleSheet: true,
    callback: callback
});

fails with the following error:

XMLHttpRequest cannot load https://spreadsheets.google.com/feeds/list/ABCD/oq7ao2t/public/values?alt=json&sq=select%20B,%20C. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://4afe0e27c254af279a8d9135ef7dbe31d78cf487.googledrive.com' is therefore not allowed access. The response had HTTP status code 400.
@sidvishnoi
Copy link

with new spreadsheets "sq" parameter doesn't work - line 321.
alternative - i don't know yet

@hiteshchavda
Copy link

+1

@hugolpz
Copy link

hugolpz commented Apr 12, 2015

Note: The solution I found is to use an old spreadsheet which work, fork it (create copy), then rename it for the mission of the day. It's ugly but working.

@freder
Copy link

freder commented Jul 15, 2015

fails for me, too:

Tabletop.init({ key: key/*, callback: main*//*, simpleSheet: true*/ });

@kirps
Copy link

kirps commented Sep 28, 2015

I also had this issue and have no old spreadsheets left from which to fork... also seems incredibly fragile...

@sidvishnoi
Copy link

sidvishnoi commented Sep 30, 2015 via email

@Jmuccigr
Copy link

I think I'm getting bit by this too. Seeing Invalid query parameter value for sq. on what I think are valid queries (though there's no query example in the readme, so I'm not 100%).

@vena
Copy link

vena commented Oct 13, 2016

it appears the URL parameter in google's query language is now "tq"

https://developers.google.com/chart/interactive/docs/querylanguage

replacing &sq= with &tq= at line 323 appears to work for my simple use case.

@hugolpz
Copy link

hugolpz commented Oct 25, 2016

Can someone confirm Vena's solution ? => pull request.

@jsoma
Copy link
Owner

jsoma commented Oct 6, 2019

Just cleaning up issues: it's in as tq, but pretty sure it still doesn't work

@jsoma jsoma closed this as completed Oct 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants