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

„Share Story“ Button doesn’t work, error: „ZeroClipboard is deprecated“ #222

Open
tibor opened this issue May 6, 2018 · 5 comments

Comments

@tibor
Copy link

tibor commented May 6, 2018

Hi,

we discovered odyssey.js last week and built a card with it.
Unfortunately, the „share story“ button doesn’t work for us, neither in Chrome nor in Firefox or Safari.

I checked the console and got following error messages when I clicked on the button:

`new ZeroClipboard(elements, options)` is deprecated. See docs for more info:
    https://github.com/zeroclipboard/zeroclipboard/blob/master/docs/instructions.md#deprecations
C @ ZeroClipboard.min.js:9
K @ ZeroClipboard.min.js:9
(anonymous) @ sandbox.js:202
(anonymous) @ d3.js:1047
d3.js:1921 POST https://api.github.com/gists 401 (Unauthorized)
xhr.send @ d3.js:1921
xhr.(anonymous function) @ d3.js:1907
(anonymous) @ sandbox.js:569
(anonymous) @ d3.js:1918
event @ d3.js:430
respond @ d3.js:1871
load (async)
d3_xhr @ d3.js:1859
(anonymous) @ d3.js:1853
Gist @ sandbox.js:555
(anonymous) @ sandbox.js:194
(anonymous) @ d3.js:1047
sandbox.js:570 Uncaught TypeError: Cannot read property 'responseText' of undefined
    at Object.<anonymous> (sandbox.js:570)
    at Object.event (d3.js:430)
    at XMLHttpRequest.respond (d3.js:1873)
@erlenbusch
Copy link

+1 please help!

@bplmp
Copy link

bplmp commented Jun 19, 2018

I'm afraid this is because of the POST https://api.github.com/gists 401 (Unauthorized), which is trying to post a gist to Carto's account from the sandbox. Maybe this is a simple fix?

@bplmp
Copy link

bplmp commented Jun 19, 2018

Related: github removed anonymous gist creation in February 2018, which probably broke this.

Not sure how this can be fixed, since Carto will probably not authenticate to create sandbox users' gists. Maybe the best solution for now is to teach users on how to create their own gists and view them on bl.ocks.

@erlenbusch
Copy link

erlenbusch commented Jun 19, 2018

@bplmp unfortunately, the problem for us is that we need to utilize iframes, which was apart of the sharing feature of odyssey.js, and bl.ocks hasn't supported since 2016.

I haven't been able to get a similar solution from using rawgit.com either. Suggestions welcome!

@bplmp
Copy link

bplmp commented Jun 19, 2018

@erlenbusch then perhaps you could use github pages? I've used iframes from github pages in other sites previously and it worked ok.

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