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

Broken rendering? #277

Closed
amotl opened this issue May 26, 2021 · 9 comments
Closed

Broken rendering? #277

amotl opened this issue May 26, 2021 · 9 comments

Comments

@amotl
Copy link
Member

amotl commented May 26, 2021

Hi there,

@proddata just shared this screenshot with me. It shows scrambled garbage output when visiting the documentation space.

According to his report, it only happens on https://crate.io/docs/crate/tutorials/. He has been able to verify it on two different devices using two different internet connections. On the other hand, I have not been able to reproduce it in any way.

image

With kind regards,
Andreas.

@amotl
Copy link
Member Author

amotl commented May 26, 2021

Maybe it is related to #261 in any way? As outlined at #261 (review), the response body of https://crate.io/navi-promo.php is not actually empty (Content-Length: 23) but apparently contains some newline or other weird characters.

If that also happens with https://crate.io/navi-newsletter.php, there might be a chance that those characters have been introduced by adding the respective ESI snippets.

/cc @msbt

@amotl amotl transferred this issue from crate/crate-tutorials May 26, 2021
@msbt
Copy link
Collaborator

msbt commented May 26, 2021

Ah yes, I've only created the PR but it's not merged and the new config didn't make it to fastly just yet. I've renamed the file to remove the issue and flushed the cache so it will disappear. This will work when the fastly config gets an update, sorry for that :/

@msbt
Copy link
Collaborator

msbt commented May 26, 2021

Ok something is not right, there are several errors on various docs pages. We meant to test the new version on a single repo, can we roll back and do that to see what's going on here? @amotl @norosa

getting
Uncaught TypeError: $.cookie is not a function
two more json errors and also
Error loading Read the Docs footer readthedocs-doc-embed.js
and
Error registering page view readthedocs-doc-embed.js

@msbt
Copy link
Collaborator

msbt commented May 26, 2021

The initial rendering issue should be resolved (this happens when you try to include an already gzipped document, that's why the Fastly thing should have happened first. I've added an empty file as include and will rename the proper one when the new config is live. Either way, there are some other issues mentioned above that need addressing.

@msbt
Copy link
Collaborator

msbt commented May 27, 2021

@amotl I did a bit of comparing and it seems one of the issues is that we load jquery too late, this needs to be loaded before the bundled js file which includes some jquery functions (e.g. the cookie thing). The others could be also related to that, since there are some jquery messages in the debugger.

@amotl
Copy link
Member Author

amotl commented May 27, 2021

Thank you for figuring this out! We probably missed this detail because the corresponding code has not been run in the local sandbox when just looking at the examples, right?

@msbt
Copy link
Collaborator

msbt commented May 27, 2021

Yes, the cookie thing is only used when a segment id is supplied ({% if theme_tracking_segment_id %} - so only on production) and rtd is probably only in use when rendered there, at least I think I didn't see any errors while testing.

@amotl
Copy link
Member Author

amotl commented May 27, 2021

There might be a problem webpack not exposing the $.cookie symbol properly. However, I found it is available as jquery.cookie. #279 brings in a corresponding patch.

image

@amotl
Copy link
Member Author

amotl commented May 27, 2021

The Uncaught TypeError: $.cookie is not a function error should be gone now. I verified it on:

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

2 participants