Giter Site home page Giter Site logo

Comments (7)

lo48576 avatar lo48576 commented on July 23, 2024

I'm not familiar with the ecosystems of Python and/or Django, so I identified the cause but I'm not sure how to describe this problem and which component is responsible to fix this and how.

If this should be fixed on sass-processor side, could you escalate this to them please?

from bookwyrm.

joachimesque avatar joachimesque commented on July 23, 2024

I can confirm the problem on my instance (boitam.eu) and can confirm that your fix works. I don’t have the time/energy to go deeper into that. Perhaps you could open a pull request with that diff?

from bookwyrm.

lo48576 avatar lo48576 commented on July 23, 2024

Created PR #3384.

from bookwyrm.

oculos avatar oculos commented on July 23, 2024

It seems that my browser still complains that this file can't be loaded:
shepherd.min.js.map
While the fix seems to have worked for the css files, it still complains about that one.

from bookwyrm.

lo48576 avatar lo48576 commented on July 23, 2024

It seems that my browser still complains that this file can't be loaded:
shepherd.min.js.map

Should that file really be served in the first place?
I visited some (unbroken) instances from https://joinbookwyrm.com/instances/ and then opened shepherd.minejs from the JS debuggers of the browser, but none of them served the file.
(The responses were 404 for some and 403 for others, but it would be due to the difference of access control settings at the static file backend, so no real difference.)

The source map file is something that just helps the browser and developer to inspect the script if available, so it would be requested even when no one told the file is there.
Imagine favicon.ico, the browser will request it (and get 404 in not few cases) even when no one provided the link to it.

Additionally, the paths of source map files won't be provided from SASS processor, so I believe it should be a (possibly unrelated) separate issue from this one if it is really an issue.

from bookwyrm.

oculos avatar oculos commented on July 23, 2024

It seems that my browser still complains that this file can't be loaded:
shepherd.min.js.map

Should that file really be served in the first place? I visited some (unbroken) instances from https://joinbookwyrm.com/instances/ and then opened shepherd.minejs from the JS debuggers of the browser, but none of them served the file. (The responses were 404 for some and 403 for others, but it would be due to the difference of access control settings at the static file backend, so no real difference.)

The source map file is something that just helps the browser and developer to inspect the script if available, so it would be requested even when no one told the file is there. Imagine favicon.ico, the browser will request it (and get 404 in not few cases) even when no one provided the link to it.

Additionally, the paths of source map files won't be provided from SASS processor, so I believe it should be a (possibly unrelated) separate issue from this one if it is really an issue.

I imagined that. I don't see any lack of functionality regarding that file. I just thought it was worth mentioning.
Great job that you found a fix for the static files, btw!

from bookwyrm.

teusday avatar teusday commented on July 23, 2024

Looking at the flagship Bookwyrm instance, it looks like the intent is to move the themes to a separate css folder in the storage bucket. The theme for that instance is loading from https://bookwyrm-social.sfo3.digitaloceanspaces.com/css/themes/bookwyrm-light.css.

However, for me,./bw-dev update, as well as manually re-running compile_themes and collectstatic, didn't actually place the css files into the root css folder.

Instead of the fix above, I just moved the /static/css folder to /css, which also resolved the issue.

I'd love some guidance on which is the right way to go - the patch from lo48576 or relocating the files

from bookwyrm.

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.