WTFEngine
WTFEngine copied to clipboard
Code doesn't pull from googlesheet anymore
Hi
This was an amazing piece of code. Sadly doesn't work any more. I think the Google sheet URL nomenclature changed for one. But I am not certain how to update the file. I'm hoping it can be fixed.
Was great while it lasted. Hope someone fixes it as the sites made with a link to a google sheet no longer work.
Thanks
Rubik
What's the error that you're getting? Have you published the google doc from which you're drawing the data?
I wasn’t getting an error. The site was up and working for years and it suddenly stopped. So I looked at the example links of other sites made with this code and the ones that pull from Google sheets don’t work. The ones that are using manual arrays or maybe separate json files do.
Oh my bad the console does show errors - Failed to load resource: the server responded with a status of 404 () Uncaught Cannot load spreadsheet. Is it published? (@see https://support.google.com/drive/answer/37579?hl=en) wtf.js:311
I think the error is in this line var DOCS_PATH = "https://spreadsheets.google.com/feeds/list/{key}/od6/public/values?alt=json";
Nowadays the url reads - https://docs.google.com/spreadsheets/d/
The key is 44 characters now, I think the original code is set for 32.
It looks like this is an issue of API v3 vs APIv4 w Google sheets. The wtf.js file would need to be altered to work with the new API I think. I'm no good w json so I haven't figured out how to fix it just yet.