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

Settings not working #213

Closed
callym opened this issue Jun 27, 2018 · 9 comments · Fixed by #332
Closed

Settings not working #213

callym opened this issue Jun 27, 2018 · 9 comments · Fixed by #332
Assignees

Comments

@callym
Copy link

callym commented Jun 27, 2018

Recently Rustdoc has started generating a Settings page, which works fine on the std website, but on docs.rs, never saves the settings.
The browser console gives this error:
Uncaught SyntaxError: Unexpected token <
But doesn't give any more information to track it down any further.

@pravic
Copy link

pravic commented Aug 1, 2018

Same here. It has been broken for a while, and it's really annoying.

To reproduce:

While rustdoc itself works fine (or may be it has been fixed):

https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html
https://doc.rust-lang.org/nightly/settings.html

@pravic
Copy link

pravic commented Aug 29, 2018

No idea?

@onur
Copy link
Member

onur commented Oct 26, 2018

Maybe @GuillaumeGomez can help us with this.

@GuillaumeGomez
Copy link
Member

I'll take a look.

@GuillaumeGomez GuillaumeGomez self-assigned this Oct 26, 2018
@sunjay
Copy link
Member

sunjay commented Apr 1, 2019

Any update on this? I ran into this today.

@whatisaphone
Copy link

Workaround:

  1. Teach yourself javascript in 21 days
  2. Go to https://doc.rust-lang.org/settings.html
  3. Configure things as you like
  4. Make a note of what's in localStorage
  5. Go to https://docs.rs/futures-preview/0.3.0-alpha.13/futures/
  6. Copy the localStorage entries over one by one

@GuillaumeGomez
Copy link
Member

I didn't look yet. But I assume it comes from crates that have been generated with a previous rustdoc version.

Teach yourself javascript in 21 days

That's a pretty bad joke (if it's a joke).

@Nemo157
Copy link
Member

Nemo157 commented Apr 15, 2019

It looks like (at least for some instances of this) the settings page JS file is missing, e.g. https://docs.rs/futures/0.1.26/settings.html tries to load https://docs.rs/futures/0.1.26/settings-20190318-1.35.0-nightly-0f88167f8.js which just returns a redirect to the futures homepage. Trying an absolute URL like the rest of the loaded resources (in this case https://docs.rs/settings-20190318-1.35.0-nightly-0f88167f8.js) returns a 404 instead.

@QuietMisdreavus
Copy link
Member

QuietMisdreavus commented Apr 15, 2019

@Nemo157 Great catch! It looks like we're not hosting that file. I ran a test on a dev server, and it looks like if we start loading that file in, the settings menu starts working. I've posted #332 to start adding that file in with new releases. I'll see what it will take to start hosting prior versions of that file, too.

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

Successfully merging a pull request may close this issue.

8 participants