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

CompareCSS needs Content-Type set or @@iterate_diff fails in Firefox #115

Open
seanupton opened this issue Oct 23, 2024 · 0 comments
Open

Comments

@seanupton
Copy link
Member

seanupton commented Oct 23, 2024

Firefox requires CSS resources to have a permitted mime type in Content-Type header; the CompareCSS view serves compare.css as text/plain. Firefox console messages indicate (on @@iterate_diff):

The stylesheet compare.css was not loaded because its MIME type, “text/plain”, is not “text/css”.

In the absence of converting this to a change to plone.app.iterate (to serve compare.css as a browser resource from iterate, not an interim view in CMFEditions), I'm documenting here this omission. I am working around this in my own projects by providing a subclass of this view in my site policy that sets the mime type to text/css in __call__.

(I would submit a PR here, but suspect that a change to iterate is a more appropriate solution to remove the need for the CompareCSS view — I may look at that when I can).

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

1 participant