Hi,

css_path is $Conf{'static_content_path'}.'/css' if not defined

It's been fixed this way in the development branch :

@@ -723,7 +771,8 @@
      $param->{'css_url'} = &Conf::get_robot_conf($robot, 'css_url');
      ## If CSS file not found, let Sympa do the job...
      unless (-f $param->{'css_path'}.'/style.css') {
-        &wwslog('err','Could not find CSS file %s, using default CSS', 
$param->{'css_path'}.'/style.css');
+        &wwslog('err','Could not find CSS file %s, using default CSS', 
$param->{'css_path'}.'/style.css') 
+            if ($param->{'css_path'}); ## Notice only if path was defined
         $param->{'css_url'} = $param->{'base_url'}.$param->{'path_cgi'}.'/css';
      }

If  css_url dir does not exist, the Upgrade process will create it and
create .css files in it.

So, please :
Stefan Hornburg : could you please double-check that the default
static_content_pass/css directory is writable for user sympa ?
Sympa-author : will you release a new 5.2 release ? If so, would you
apply this patch in the 5_2 branch ?

Thanks,
Sylvain

Olivier Berger a écrit :
> Package: sympa
> Version: 5.2.3-1
> Severity: minor
> Tags: patch
>
> Sympa logs (/var/log/sympa.log) contain error messages complaining for file 
> /style.css not found :
> could not find CSS file /style.css, using default CSS
>
> Such error occurs all the time  (each action in wws, acutally), and thus 
> annoying. I noticed it by using logcheck.
>
> But I think this is actually no error when no css_path was defined (by 
> default), according to the docs, because in such case, sympa will construct a 
> dynamic CSS instead of using a predefined static CSS file (css_path + 
> css_url).
> So this should only be an info message I think, when no css_path is defined 
> (or nothing).
>
> Here's a proposed workaround.
>
> /usr/lib/cgi-bin/sympa# diff -uibw wwsympa.fcgi.orig wwsympa.fcgi
> --- wwsympa.fcgi.orig   2007-01-23 14:52:04.000000000 +0100
> +++ wwsympa.fcgi        2007-01-23 14:49:20.000000000 +0100
> @@ -723,7 +723,7 @@
>       $param->{'css_url'} = &Conf::get_robot_conf($robot, 'css_url');
>       ## If CSS file not found, let Sympa do the job...
>       unless (-f $param->{'css_path'}.'/style.css') {
> -        &wwslog('err','Could not find CSS file %s, using default CSS', 
> $param->{'css_path'}.'/style.css');
> +        &wwslog('info','Could not find CSS file %s, using default CSS', 
> $param->{'css_path'}.'/style.css');
>          $param->{'css_url'} = 
> $param->{'base_url'}.$param->{'path_cgi'}.'/css';
>       }
>
> In fact, I think a better algorithm should be needed : if no css_path is 
> defined, nothing to log, and otherwise, if the file is not found in css_path, 
> then THERE is an error to log, then.
>
> Hope this helps.
>
> Should probably be forwarded upstream ?
>   



Reply via email to