This is a great little module but I have been having some issues getting this running on my server.
I am running a multisite pressflow installation with memcache and boost installed. Cron is running and I have cleared the cache several times as well as completely disabling it to test if the caching was interfering somehow. I have this module working on my macbook using the latest Aqcuia stack installer which runs php 5.3 i believe.
My status report reads
CSSTidy Compression No Data
Try clearing your cache.
Server config
Apache/2.2.3 (Red Hat)
PHP 5.2.14
MySQL 5.1.47
Anybody have any ideas here? With the server config I am running this modules doesn't save much overall but every little bit helps.
Comments
Comment #1
philbar commentedI'll do some test with pressflow when I have a chance. There could be an issue with the way they patch core.
Can you tell me if the source of your HTML files has files listed as the following?
*.csstidy.cssIf those files are being listed, then we know it is a problem with the reporting feature which is minor.
There is an issue with Boost which prevents the stylesheets from being properly gzipped when there are two periods, but I don't think that is causing your problem.
#940554: CSS files with multiple periods (.) in the filename
Comment #2
cluke009 commentedNo its missing the *.csstidy.css extension on the production machine. I looked in the files/css directory as well and I doesn't look like the files are ever being created. I'll try testing on a vanilla pressflow install as this site has quite a few modules installed that could be interfering.
Edit:
Tested under pressflow 6.19.94 no other modules installed. Got this error Notice: Undefined index: #weight in csstidy_form_alter() (line 14 of csstidy.module). Still not functioning.
Comment #3
cluke009 commentedLooks like the files aren't being processed because of
The $styles don't match the $pattern so the files aren't being generated.
My regex knowledge is pretty much non-existent but this seems to be where the problem is.
Ran drupal_set_message('testing') after 'if (preg_match_all($pattern, $styles, $matches) > 0) {' under pressflow and drupal to confirm it was not firing in pressflow.
Comment #4
cluke009 commented$pattern = '/<link(.*?)href="' . preg_quote($path_to_files_directory, '/') . '(.*?)"(.*?)\\/>/';is the issue.drupal prints css paths /sites/all/files/xxx.css and pressflow print the full url http://www.example.com/sites/all/files/xxx.css
We need some kind of place holder after href= that can accept any value or none.
This could be a subdomain or https or nothing depending on which distro your using and your specific site settings.
Comment #5
philbar commentedThat shouldn't be a problem if
$path_to_files_directoryis http://www.example.com/. I have a feeling it is CDN that is interfering. I had Parallel working, but CDN might do things slightly different.I'll try to test this next week.
Comment #6
philbar commentedI'm wondering if this issue has something to do with it. #938670: Allow for Boost integration: provide a public API function that returns all CDN domains
Comment #7
philbar commentedI installed a fresh copy of Pressflow and CSStidy is not working. So it's definitely a problem with Pressflow.
Comment #8
philbar commentedTested it with Drupal 6 and CDN and there is no problem there.
Comment #9
realityloop commentedThis looks like it might be related to the following Pressflow issue:
https://bugs.launchpad.net/pressflow/+bug/597718
I tried this patch, but it didn't resolve the issue for me:
https://code.launchpad.net/~wimleers/pressflow/hook_file_url_alter_bugfi...
Comment #10
wim leers@philbar: Glad it works for you!
@realityloop: is this happening with CDN 2.0 RC5?
Let me know if I can be of any help.