Closed (fixed)
Project:
Alter CSS
Version:
5.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Sep 2007 at 18:54 UTC
Updated:
23 Feb 2008 at 21:53 UTC
I'm unable to get this module to save a New css file. I've gone into the theme and can see the new CSS fields. I can copy/paste the Backup into a New CSS but when I click Save File the screen refreshes and nothing is saved. I've tried on multiple themes with the same results. In going into the theme for the first time it does save the backup file so at the file/folder lever permissions are correct. Not sure what else to check, even installed AJAX Session module just to rule that out, and no luck.
Thanks, look forward to using this module.
Comments
Comment #1
shawn conn commentedI'll try to see if I recreate the bug you're describe. As it is right now, its working on my site Shawn Conn.com. Also, note AJAX Session is not a required module for Alter CSS to work. The README reference in the 1.0 release was ,regrettably, the result of creating multiple README files at one time and not enough proofreading.
Comment #2
bsdaddict commentedsame problem here, the file simply won't save.
Comment #3
bsdaddict commentedmethinks this module requires on PHP5. I debugged using firebug, got an error along the lines of:
Fatal error: Call to undefined function: file_put_contents() in /public_html/sites/all/modules/alter_css/alter_css.module on line 172
searched and found http://drupal.org/node/90713, which contains a solution that seems to fix the "css won't save" problem.
Comment #4
kadmos-1 commentedI've running my website under php 4.3 and had the same problem with the module.
With some googleing i found that the function file_put_contents was introduced with php 5.0.
Would you please add some lines to your readme file of the plugin, or add the lines:
if(!function_exists('file_put_contents')) {
function file_put_contents($filename, $data, $file_append = false) {
$fp = fopen($filename, (!$file_append ? 'w+' : 'a+'));
if(!$fp) {
trigger_error('file_put_contents cannot write in file.', E_USER_ERROR);
return;
}
fputs($fp, $data);
fclose($fp);
}
}
to your file alter_css.module.
For all others, having the same problem: Edit the file alter_css.module and add the lines above at the end of the file.
Greeting
Kadmos
Comment #5
shawn conn commentedSorry for the late reply. Instead of implementing the function above, I've just replaced the file_put_contents() with fopen() & fwrite() which will accommodate PHP 4 users.
Comment #6
shawn conn commentedImplemented in release 1.1, set to active if issue still continues.
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.