Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

known issue: console error . . . /csv/Options.csv 404 (Not Found) #15

Open
JackDougherty opened this issue Oct 12, 2016 · 6 comments
Open

Comments

@JackDougherty
Copy link
Collaborator

Create option for users who wish to transform and preserve their dynamic Google Sheet data into more stable CSV files to be uploaded into the GitHub repo, to create a more stable version of the map.

@easherma
Copy link

easherma commented Nov 1, 2016

+1, even as JSON. If I get some spare time I'd love to help play around with loading the configuration and data from json instead of google sheets,

@JackDougherty JackDougherty changed the title Create option to preserve Google Sheet dynamic data in CSV format in repo Create option to preserve Google Sheet dynamic data in either JSON or CSV format in repo Nov 7, 2016
@JackDougherty
Copy link
Collaborator Author

JackDougherty commented Dec 20, 2016

For @ilyankou: I think this is a bug, but maybe it just needs more testing on different browsers and computers.

Problem: How do I know if the map contents are accurately pulled from Google Sheets or CSV? I ran a test and labeled them differently (with either Sheets or CSV in the map title).

Chrome did not correctly read the CSV tables, and continued to display old map data (from the browser cache?), even after I did several hard refreshes (on Mac: command-shift-R)

By contrast, my FFox correctly displayed the CSV table contents. However, I have set up my FFox browser to store no history, cache, etc. between sessions.

PS: Interestingly, when I erased the CSV folder and its contents, Chrome accurately read the new contents (from Sheets)

interdistrict_public_schools_in_hartford__ct__from_csv__and_interdistrict_public_schools_in_hartford__ct

@JackDougherty
Copy link
Collaborator Author

JackDougherty commented Dec 20, 2016

Another problem: with this new code, with CSV tables uploaded, both Chrome and FFox for Mac display this error:

jquery-3.1.0.min.js:4
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.

@JackDougherty
Copy link
Collaborator Author

Another problem: with this new code, when I erase the CSV folder and tables inside it, Chrome (but not FFox) displays this error:

Failed to load resource: the server responded with a status of 404 (Not Found)
https://jackdougherty.github.io/leaflet-maps-with-google-sheets/csv/Options.csv

@ilyankou
Copy link
Contributor

Jack, first and third are connected. Google Chrome does not let you work with local .geojson or .csv files for security reasons (hence XMLHttpRequest error). Thus, even when you have an Options csv in the folder, it fails to load it and hence reads the Tabletop version. It won't happen if you load it from GitHub.

"Failed to load resource" will always be an error in console if Options.csv does not exist. With JavaScript, there is not really a nice way to check if file exists – so you have to load it anyway and see if it returns failure or success.

As for jquery not supporting synchronous requests, I will try to change it to asynchronous.

@ilyankou
Copy link
Contributor

ilyankou commented Jan 1, 2017

It may be worth emphasizing that once csv files are cached, users may not get updated csv from the server unless they clear cache (I was changing the contents of the csv file on my local machine and did not see any changes in Safari when refreshing the page, only Private Mode – and also clearing cache – helped).

@JackDougherty JackDougherty changed the title Create option to preserve Google Sheet dynamic data in either JSON or CSV format in repo Known console error: HEAD ...leaflet-maps-with-google-sheets/csv/Options.csv 404 (Not Found) Jan 12, 2017
@JackDougherty JackDougherty changed the title Known console error: HEAD ...leaflet-maps-with-google-sheets/csv/Options.csv 404 (Not Found) known issue: console error . . . /csv/Options.csv 404 (Not Found) Mar 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants