Wedge

Public area => The Pub => Bug reports => Topic started by: Antes on January 6th, 2013, 12:36 AM

Title: Cannot read the CSS - Alpha 2
Post by: Antes on January 6th, 2013, 12:36 AM
I made a clean install today, i didn't have CSS issues at install but after moving to board index (which i didn't get it on Alpha 1)

Opera (12.12) only loads 6 elements from page and source outputs just plain text.

http://wedge.org/css/Wine-Wuthering/member-opera12.1-1354111854.css.gz

http://localhost/Wedge/css/guest-ie10-1352139630.css.gz
http://localhost/Wedge/css/member-opera12.1-1352139630.css.gz

Also changing skins not changing anything.

PHP version: 5.4.3
Apache version: 2.4.2
Title: Re: Cannot read the CSS - Alpha 2
Post by: Arantor on January 6th, 2013, 12:54 AM
Do those files exist inside the css/ folder?
Title: Re: Cannot read the CSS - Alpha 2
Post by: Antes on January 6th, 2013, 01:13 AM
yes they are exist.
Title: Re: Cannot read the CSS - Alpha 2
Post by: Arantor on January 6th, 2013, 01:19 AM
Does it work properly in other browsers?
Title: Re: Cannot read the CSS - Alpha 2
Post by: Antes on January 6th, 2013, 01:29 AM
IE10 / Opera 12.12 / Firefox 18 B6 all are looking broken.

Beside, it tooks little bit longer (compared to smf) to load plain text.

Edit: All theme paths are normal. (http://localhost/Wedge/Themes/default/)
Title: Re: Cannot read the CSS - Alpha 2
Post by: MultiformeIngegno on January 6th, 2013, 01:35 AM
Maybe is the same problem I experienced here http://ffio.it/forum/
Title: Re: Cannot read the CSS - Alpha 2
Post by: Arantor on January 6th, 2013, 01:41 AM
Yes, it should take a little longer to get to plain text than SMF would - on a completely fresh install the first time, where it has to generate the cached CSS. It sounds like for some reason, the CSS files are being regenerated too regularly (which would explain the slowdown) and it's not even calling them. I'm still thinking permissions issue with the CSS folder.
Title: Re: Cannot read the CSS - Alpha 2
Post by: MultiformeIngegno on January 6th, 2013, 01:46 AM
I have set 0774, owner is www-data and group is a group where there are www-data and my FTP user (so I have write access with the FTP client too).

Edit: I also tried with 755, 775 and 777 though
Title: Re: Cannot read the CSS - Alpha 2
Post by: Arantor on January 6th, 2013, 01:50 AM
Oh shit.

You're not using Apache. All the lovely hard work goes straight out the window with that. The .gz files in the CSS folder must be set to be served in the right format, which is what the .htaccess file in css/ does. I have zero idea how to configure it for nginx or anything else, assuming it's possible.

/medespairs of the support issues this is going to cause.
Title: Re: Cannot read the CSS - Alpha 2
Post by: Antes on January 6th, 2013, 02:17 AM
Ah then its not a bug. Thanks for the info. I have to configure Apache to read .htaccess as htaccess.txt
Title: Re: Cannot read the CSS - Alpha 2
Post by: Arantor on January 6th, 2013, 02:18 AM
Well, it is a bug because it's broken out of the box for you ;)

There is a .htaccess file in each of the cache, css and js folders that should be active. If you have to rename it, rename it and everything should work - but that's not a typical configuration for Apache to require htaccess.txt files (not even on Windows)
Title: Re: Cannot read the CSS - Alpha 2
Post by: Dragooon on January 6th, 2013, 07:44 AM
Perhaps some sort of alternative php script can be used as a backup for those web servers which are not supported as of now?
Title: Re: Cannot read the CSS - Alpha 2
Post by: Nao on January 6th, 2013, 09:14 AM
For starters there is an admin setting to disable gzipping for cached files.
If you can't take the heat... :eheh:
Title: Re: Cannot read the CSS - Alpha 2
Post by: Arantor on January 6th, 2013, 04:11 PM
Yes because it's so nice to tell new users "It's not really broken, you just have to go figure out how to get to the amin panel and change this setting"

It should probably be disabled on new installs.
Title: Re: Cannot read the CSS - Alpha 2
Post by: MultiformeIngegno on January 6th, 2013, 04:55 PM
We should try to create for nginx an equivalent of the htaccess script. Can you post here the relevant portion in htaccess (can't access my FTP and see by myself at this moment)?
Title: Re: Cannot read the CSS - Alpha 2
Post by: Arantor on January 6th, 2013, 05:13 PM
Does nginx support per folder rules specified by a file in that folder? If not, Wedge can't fix it at install time.
Title: Re: Cannot read the CSS - Alpha 2
Post by: MultiformeIngegno on January 6th, 2013, 05:52 PM
With the include parameter there should be a way, maybe a script that checks if that file exist in all the folders, writes in another file all the folders in which this file exist and then rearranging this list of folders to be included in a "location" parameter.
http://wiki.nginx.org/HttpCoreModule#location
http://wiki.nginx.org/CoreModule#include
Posted: January 6th, 2013, 05:51 PM
Quote from Arantor on January 6th, 2013, 05:13 PM
Does nginx support per folder rules specified by a file in that folder? If not, Wedge can't fix it at install time.
Uhm no :(
Title: Re: Cannot read the CSS - Alpha 2
Post by: Arantor on January 6th, 2013, 06:05 PM
Yup, that's the thing - we use htaccess to do non-standard handling of .gz files on specific types of request. Yes, it's possible to remap that in nginx, I just don't know what configuration you'd need. But we can't deploy per-folder rules in nginx, that's one of the things that makes it faster, it doesn't do the massive hit of folder traversal finding .htaccess files...
Title: Re: Cannot read the CSS - Alpha 2
Post by: MultiformeIngegno on January 6th, 2013, 06:37 PM
Uhm, asking on serverfault?
Title: Re: Cannot read the CSS - Alpha 2
Post by: Arantor on February 20th, 2013, 12:07 AM
I should add, after my experimentation in recent times on a shared host, I'm strongly motivated to set this hard-core caching to off (leave parsing etc. running, but not gzipping the files on the server by default)

It was not a particularly exciting test run to start with.