Page 1 of 2

Admin CSS not working

Posted: Wed May 24, 2006 1:04 pm
by bmore
Installation went well. Admin login CSS shows ok,  but when I enter the admin panel, CSS doesn't appear. I cant figure it out... Help needed!

EDIT:

CMSMS version: 0.12.2 "Savusavu"
PHP: 4.4.1
Apache: 1.3.36 (Unix)
OS: Linux

Re: Admin CSS not working

Posted: Wed May 24, 2006 2:40 pm
by bmore
bmore wrote: Installation went well. Admin login CSS shows ok,  but when I enter the admin panel, CSS doesn't appear. I cant figure it out... Help needed!
Well i got itworking. i edited class.admintheme.inc.php file and replaced

Code: Select all

<link rel="stylesheet" type="text/css" href="style.php" />
with

Code: Select all

<link rel="stylesheet" type="text/css" href="http://www.mysite.com/admin/themes/default/css/style.css" />
I still can't understand why it didn't work with original settings

EDIT: now bookmarks are missing  :'(

Re: Admin CSS not working

Posted: Wed May 24, 2006 3:46 pm
by Elijah Lofgren
bmore wrote: CMSMS version: 0.12.2 "Savusavu"
Not sure why you are having these problems. I would suggest upgrading to CMSMS 0.13 final and see if you still encounter these problems.

Re: Admin CSS not working

Posted: Wed May 24, 2006 4:20 pm
by bmore
Elijah Lofgren wrote:
bmore wrote: CMSMS version: 0.12.2 "Savusavu"
Not sure why you are having these problems. I would suggest upgrading to CMSMS 0.13 final and see if you still encounter these problems.
Tried that already. There was a same problem with admin css and menuproblems at the frontend :(

Re: Admin CSS not working

Posted: Wed Jul 05, 2006 5:42 pm
by Daniel
I'm having the same problem.
First, details:
CMS Made Simple 0.13 "Canary"
Php info here: http://dbg92.phpnet.us/phpinfo.php

Now, links:
http://dbg92.phpnet.us/ Home page (note the page title: I changed it on install, but yet it remains the default... the global settings say it's different...)
http://dbg92.phpnet.us/admin/login.php Perfectly styled login page...

Screenshot:
below:logged in admin (when i use the firefox web dev. toolbar to add the default stylesheet that i uploaded except from my own pc, it's fine and as normal.)

Finally, what the web dev. toolbar shows as the css on the main admin page

Code: Select all

CSS - http://dbg92.phpnet.us/admin/
http://dbg92.phpnet.us/admin/
http://dbg92.phpnet.us/admin/style.php

<br />
<b>Warning</b>:  readfile() has been disabled for security reasons in <b>/home/dbg92/www/admin/style.php</b> on line <b>20</b><br />
[attachment deleted by admin]

Re: Admin CSS not working

Posted: Thu Jul 06, 2006 8:19 pm
by Elijah Lofgren
Daniel wrote: ...

Code: Select all

...
<b>Warning</b>:  readfile() has been disabled for security reasons in <b>/home/dbg92/www/admin/style.php</b> on line <b>20</b><br />
Ah, so that is the problem, some webhosts have readfile() disabled.
elijahlofgren@ubuntu:~/htdocs/cmsmadesimple$ grep readfile * -R
admin/tab.php:  readfile(dirname(__FILE__)."/themes/$theme/tab.css");
admin/tab.php:  readfile(dirname(__FILE__)."/themes/default/tab.css");
admin/style.php:        readfile(dirname(__FILE__)."/themes/".$theme."/css/".$style);
admin/style.php:        readfile(dirname(__FILE__)."/themes/default/css/".$style);
It looks like readfile is mainly used so that the Admin Panel can have differerent themes.

We should come up with a workaround for servers that have readfile disabled...

As I don't have time right now to look into this I'll point this thread out to some of the devs in the #cms IRC channel.  ;)

Re: Admin CSS not working

Posted: Thu Jul 06, 2006 8:41 pm
by Ted
You should be able replace the

Code: Select all

readline(
with

Code: Select all

echo file_get_contents(
as a workaround.  I'll see if I can change this for the next release.

Re: Admin CSS not working

Posted: Fri Jul 07, 2006 11:50 am
by Daniel
Thanks so much guys! It really was becoming a bother having to apply my own stylesheet everytime I clicked on something!
I've replaced readfile() in both style.php and tab.php.  I'll let yous know if I find I need to change it anywhere else.


Daniel :D

Re: Admin CSS not working

Posted: Tue Aug 01, 2006 5:30 pm
by jke
Installation went well. Admin login CSS shows ok,  but when I enter the admin panel, CSS doesn't appear.
This was the same for me.  Installed CMSMS for the first time and went in to admin with IE...  Later, I tried Firefox and everything was ok.  Back with IE (6) and no css.

CentOS 3.7
php  4.3.11
MySQL 4.0.27
Apache 1.3.33

I use Firefox normally so this isn't a problem for me, but seems like it would be with some client users. 

BTW, CMS Made Simple looks very very promising!  I have been a lttle discouraged  ::) with some of the other cms's out there.

Re: Admin CSS not working

Posted: Tue Aug 01, 2006 7:39 pm
by Elijah Lofgren
jke wrote:
Installation went well. Admin login CSS shows ok,  but when I enter the admin panel, CSS doesn't appear.
This was the same for me.  Installed CMSMS for the first time and went in to admin with IE...  Later, I tried Firefox and everything was ok.  Back with IE (6) and no css.

CentOS 3.7
php  4.3.11
MySQL 4.0.27
Apache 1.3.33

I use Firefox normally so this isn't a problem for me, but seems like it would be with some client users. 
Would you mind trying CMSMS 1.0 beta3 and let us know if you still have this problem. The Admin Panel CSS works here in both  IE and Firefox on both CMSMS 0.13 and CMSMS 1.0 beta3. It'd odd that the styles work for you in FF, but not in IE, I hope we can track down the problem.

Looking in admin/style.php it seems that the only IE specific code is this:
if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match('/MSIE/', $_SERVER['HTTP_USER_AGENT']))
{
@ini_set( 'zlib.output_compression','Off' );
}
You could try removing that and see if it works in IE.

Hope this helps,

Elijah

Edit: Oops, I mean that is was odd that styles work in FF, but not in IE. Not the reverse. Was a typo on my part.

Re: Admin CSS not working

Posted: Tue Aug 01, 2006 9:50 pm
by jke
Thanks Elijah,

(Sorry - In my original post I forgot to mention that I was using v0.13). 

Actually it was IE in which css did not work after login.  Time permitting, I will try 1.0 beta3 this evening and see the difference.  Everything else seems to be working well.

Re: Admin CSS not working

Posted: Tue Aug 01, 2006 10:18 pm
by jke
Looking in admin/style.php it seems that the only IE specific code is this:
Quote
if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match('/MSIE/', $_SERVER['HTTP_USER_AGENT']))
{
  @ini_set( 'zlib.output_compression','Off' );
}

You could try removing that and see if it works in IE.
I tried removing those lines, and there was a difference in the behavior of IE, but still would not display css on some admin pages without page refresh.  Other odd behavior though - only in IE, some of the fck buttons will not appear some of the time... as in this screen shot/

Image

Re: Admin CSS not working

Posted: Tue Aug 01, 2006 10:35 pm
by Elijah Lofgren
jke wrote:
Looking in admin/style.php it seems that the only IE specific code is this:
Quote
if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match('/MSIE/', $_SERVER['HTTP_USER_AGENT']))
{
  @ini_set( 'zlib.output_compression','Off' );
}

You could try removing that and see if it works in IE.
I tried removing those lines, and there was a difference in the behavior of IE, but still would not display css on some admin pages without page refresh.  Other odd behavior though - only in IE, some of the fck buttons will not appear some of the time... as in this screen shot/
Hmm... I wouldn't know how to fix a random problem like this for IE. Maybe you have a slow Internet Connection or Server and the connection times out in IE because of different timeout settings or something.

Sorry I wasn't able to help. Maybe others will have an idea for how to fix your problem.

Re: Admin CSS not working

Posted: Thu Aug 10, 2006 5:15 pm
by Muzzy
Hi All.

Sorry to jump in on this post, but I have just upgraded from 0.13 to 1.0.
Some small niggles with upgrade, but main one now is that css in admin not working. I am using Firefox.

How do I get it to run OK please.
Regards.
Mike.

Re: Admin CSS not working

Posted: Fri Aug 11, 2006 3:26 am
by Elijah Lofgren
Mike Muscroft wrote: Hi All.

Sorry to jump in on this post, but I have just upgraded from 0.13 to 1.0.
Some small niggles with upgrade, but main one now is that css in admin not working. I am using Firefox.

How do I get it to run OK please.
Regards.
Mike.
bmore wrote:
I think this may be a problem if the server is under a high load. I occasionally get a page without stylesheets on this forum.
I think if you change the link to the stylesheet as quoted below it might work:
bmore wrote: Installation went well. Admin login CSS shows ok,  but when I enter the admin panel, CSS doesn't appear. I cant figure it out... Help needed!
Well i got itworking. i edited class.admintheme.inc.php file and replaced

Code: Select all

<link rel="stylesheet" type="text/css" href="style.php" />
with

Code: Select all

<link rel="stylesheet" type="text/css" href="http://www.mysite.com/admin/themes/default/css/style.css" />
I still can't understand why it didn't work with original settings
Hope this helps,

Elijah