Aggregate and compress CSS not working.

ldway - October 21, 2007 - 05:28

I have tried to set this to enabled. But this causes my site to lose all css formating and just white screens with links on the left side are left. I set it to disabled and the site comes back.

I am running a multi site and under the sites/mydomain.com directory I have the files directory with the proper permissions set and I also have the permissions det for the tmp directory

For the files dir setting I have the current path set to:
c:\inetpub\wwwroot\sites\mydomain.com\files

For the tmp dir setting I have the current path set to:
c:\inetpub\wwwroot\sites\mydomain.com\tmp

I am using a dedicated windows2003 IIS server.

What could be causing this? This happpens using ANY theme.

I really need this setting as the theme I want to use absolutley requires it since formating issues happen without it when using IE6,7.

P.S... I have been through every search and post about this subject and the issues others had were related to permissions on either their files directory or their tmp directory. So I am out of answers.

Please help, :)

Thanks,

Dave

vague memories

tm - October 21, 2007 - 06:05

remember seeing something about caching and css aggregation, especially when making theming changes. maybe clearing the database cache? or possibly the browser cache. i am assuming the remaining blocks are from a block cache of some sort. not sure though.

sorry.

Same here

Linulo - October 21, 2007 - 07:44

I experienced the same problem. I could reproduce the problem after changing anything in the global site settings (like site logo) using the Zen theme on drupal 5.2. Pages do not contain links to CSS files anymore afterwards.

I have a database dump before and after but I did not yet find the time to pinpoint the problem by analyzing the diff. On first glance it seems to be cache related.

Still same problem. But I am

ldway - October 21, 2007 - 15:00

Still same problem. But I am not changing any global settings, logo's etc.

When I enable it I notice it is not writing any files to the files/css directory. I have checked and all write permissions on the directories are there so cannot figure this problem out. arrrg

Just praying someone has the answer.

just an observation

tm - October 21, 2007 - 18:26

because i don't normally use this feature, i am unsure of the intended behavior.

on a local install, i enabled css aggregate. a css folder appears in the /files folder with a random-named css file. looking at the page source confirms that this is the css file being called. i also tried it with "normal" caching enabled, and i am okay, so far.

good luck!

NEW INFO...

ldway - October 22, 2007 - 04:23

-------------------------------------------------------------------
This is what is generated in the source when I have it DISABLED...
-------------------------------------------------------------------

<style type="text/css" media="screen">
  <!--
   @import url(/sites/all/themes/spreadfirefox/modules.css);
   @import url(/sites/all/themes/spreadfirefox/nav.css);
   @import url(/sites/all/themes/spreadfirefox/layout.css);
  -->
</style>
  <style type="text/css" media="all">@import "/modules/aggregator/aggregator.css";</style>
<style type="text/css" media="all">@import "/modules/book/book.css";</style>
<style type="text/css" media="all">@import "/modules/node/node.css";</style>
<style type="text/css" media="all">@import "/modules/system/admin.css";</style>
<style type="text/css" media="all">@import "/modules/system/defaults.css";</style>
<style type="text/css" media="all">@import "/modules/system/system.css";</style>
<style type="text/css" media="all">@import "/modules/user/user.css";</style>
<style type="text/css" media="all">@import "/sites/all/modules/cck/content.css";</style>
<style type="text/css" media="all">@import "/sites/all/modules/logintoboggan/logintoboggan.css";</style>
<style type="text/css" media="all">@import "/sites/all/modules/og/og.css";</style>
<style type="text/css" media="all">@import "/sites/all/modules/cck/fieldgroup.css";</style>
<style type="text/css" media="all">@import "/sites/all/themes/spreadfirefox/style.css";</style>

-------------------------------------------------------------------
This is what is generated in the source when I have it ENABLED...
-------------------------------------------------------------------
<style type="text/css" media="screen">
  <!--
   @import url(/sites/all/themes/spreadfirefox/modules.css);
   @import url(/sites/all/themes/spreadfirefox/nav.css);
   @import url(/sites/all/themes/spreadfirefox/layout.css);
  -->
</style>
  <style type="text/css" media="all">@import "/c:\inetpub\wwwroot\sites\mydomain.com\files/css/2620cb76e4b9c6c5d899ceafe3a0be00.css";</style>

NOTICE the last line above and see that it is using the machine path and it is puting the forward and backward slashes intermixed!

What in the world could be causing this?

base path?

tm - October 22, 2007 - 06:54

so the section that is supposed to be "/" (for base_path) is getting corrupted, somehow?

took a peek into api.drupal.org looking for the css aggregate function; search for "css" and a list comes up. i looked into the includes/common.inc, and promptly got lost. i suppose the same would happen if i tried to look at files.inc...

wondering if refreshing the includes folder would help? usual backup precautions... dunno, your call.

Still no love

ldway - October 23, 2007 - 02:08

Well thanks TM for taking a peek into those files. I do know about getting lost in those things because I have been there and done that many a time.

I did try refreshing the include directory but no help there. (I am using 5.3). I also made a test site with no modules installed and had the same results. Very strange thing indeed.

After re-looking at that output source I tried a few crazy things like changing the files setting to have a path without the drive letter, also just a relitive path and finally using all forward unix style slashes. Funny thing is, even doing all that it still writes the compressed file to the files/css directory but the html output is still the same problem.

Oh well, guess I will have to live without that feature until I can finally get it solved. :)

thanks again for looking around on this! :)

-- Dave

darn

tm - October 23, 2007 - 02:38

the aggregate css file does not seem to be the problem, just the path referencing it. usually only see the local paths in the error logs. wonder if it is related. an interesting test would be to change page.tpl.php and hard-code the import call to the css file

i am wondering if it has to do with iis isapi/rewrites. you seem to have clean urls going (that is a good thing! could never get it going on iis). i was wondering what would happen if you tried copying this installation to an apache-based solution? sounds like you have the chops to roll your own WAMP server; you might have to change ports.

i have some experience with iis, but not related to php/drupal. i think i need to build myself such an installation, just because it is now annoying.

Clean URL's and rewrite not the problem.

ldway - October 25, 2007 - 07:07

Well I finally got the chance to completely uninstall my ISAPI_REWRITE and take away clean URL's. Nothing changed, still same problem with the weird output in html.

This is for sure a strange thing. I am completely out of ideas.

well...

tm - October 25, 2007 - 07:19

there is always irc... surely someone there has seen or heard of it. i am mystified. i am sure it will be something simple but seemingly unconnected.

good luck, and best wishes.

PROBLEM FINALLY SOLVED!

ldway - November 1, 2007 - 23:51

Finally, solved this one! Here is the key:

Originally I had set the following in the file system settings:

For the files dir setting path set to:
c:\inetpub\wwwroot\sites\mydomain.com\files

For the tmp dir setting the path set to:
c:\inetpub\wwwroot\sites\mydomain.com\tmp

The Fix:

Since this is a windows server, the temporary directory must be set to using a full path to the desired temp directory. So this was left as it was.

However, the file system path must instead use a relative path AND it must be formated in nix style with using slashes instead of windows back slashes. So, the new setting ended up being:

sites/mydomain.com/files

Would be nice and would help others that are running windows if they added a small tid bit on the screen that the file system path must use forward slashes. (The instructions for making the path Relative to the drupal install directory [if directory is public] is actually already there right under the field entry. (I simply ignored reading that part)

Hopefully this may help someone else someday if they run into the same problem I had.

- Dave

subscribe

vkr11 - June 21, 2008 - 20:27
 
 

Drupal is a registered trademark of Dries Buytaert.