-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
CSS not injected correctly in some ZIM files #230
Comments
I suspect the CSS is not detected properly by kiwix-html5 (in jQuery mode), and not injected at all. |
When I read http://www.openzim.org/wiki/ZIM_file_format#Namespaces , I see that CSS should be in the - namespace instead of A |
(FYI I've extracted the following and repeated it from notes I made on one of my issues so you don't have to wander over there to follow the story julianharty/testing-heuristics#8) Background contextA couple of years ago, partly to help us get the PhET simulations to work, Emmanuel either implemented or explained another approach where all the files would be put in the Emmanuel has opened a ticket to investigate further changes to the ZIM file format openzim/libzim#15 |
This needs to be tested again : it might have been fixed in version 2.2 |
This has not been fixed in 2.2. |
I think we should close this and open a new issue relating to upcoming changes in openzim/libzim#15 (removal of namespaces). I think we will need to address the general issue of arbitrary content being placed in a 'flat' structure, even though I don't currently understand the advantage of doing this... |
I agree. |
As initially reported in #220 by @julianharty :
When I use the content I create (from github.com/julianharty/testing-heuristics) the CSS doesn't get applied. When we generate the content we use
zimwriterfs --uniqueNamespace ...
so that the CSS can be found (well sort of at the moment). However, it seems that might cause some knock-on complications as the mime-type is now reported by Google Chrome astext/html
(see below for the message Chrome Developer Console shows). The bug may be inzimwriterfs
I'll cross-link the relevant issue. openzim/libzim#15 I'll also zip the ZIM file and add it here (I can't attach it directly with a.zim
extension).Here's the ZIM file I used. It's zipped so will need unzipping before using it.
th20170509.zim.zip
OK, a quick test using my kiwix-apache module (which logs the filename and mime-type in Apache Server's
error.log
) indicates that the mime-type is set correctly for./A/style.css
(at least as far as I can tell)The CSS is being applied correctly e.g. if I visit http://localhost/kiwix/A/I%20SLICED%20UP%20FUN.html (which will only work for you if you've got
kiwix-apache
setup to use the above ZIM file).The text was updated successfully, but these errors were encountered: