Coder Social home page Coder Social logo

Broken rendering? about crate-docs-theme HOT 9 CLOSED

crate avatar crate commented on June 27, 2024
Broken rendering?

from crate-docs-theme.

Comments (9)

amotl avatar amotl commented on June 27, 2024

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

from crate-docs-theme.

msbt avatar msbt commented on June 27, 2024

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 :/

from crate-docs-theme.

msbt avatar msbt commented on June 27, 2024

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

from crate-docs-theme.

msbt avatar msbt commented on June 27, 2024

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.

from crate-docs-theme.

msbt avatar msbt commented on June 27, 2024

@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.

from crate-docs-theme.

amotl avatar amotl commented on June 27, 2024

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?

from crate-docs-theme.

msbt avatar msbt commented on June 27, 2024

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.

from crate-docs-theme.

amotl avatar amotl commented on June 27, 2024

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

from crate-docs-theme.

amotl avatar amotl commented on June 27, 2024

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

from crate-docs-theme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.