Admin CSS not working

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
bmore

Admin CSS not working

Post 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
Last edited by bmore on Wed May 24, 2006 1:27 pm, edited 1 time in total.
bmore

Re: Admin CSS not working

Post 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  :'(
Last edited by bmore on Wed May 24, 2006 2:41 pm, edited 1 time in total.
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: Admin CSS not working

Post 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.
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
bmore

Re: Admin CSS not working

Post 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 :(
Daniel
Forum Members
Forum Members
Posts: 20
Joined: Fri Apr 14, 2006 7:47 pm

Re: Admin CSS not working

Post 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]
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: Admin CSS not working

Post 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.  ;)
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: Admin CSS not working

Post 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.
Daniel
Forum Members
Forum Members
Posts: 20
Joined: Fri Apr 14, 2006 7:47 pm

Re: Admin CSS not working

Post 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
jke

Re: Admin CSS not working

Post 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.
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: Admin CSS not working

Post 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.
Last edited by Anonymous on Tue Aug 01, 2006 9:57 pm, edited 1 time in total.
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
jke

Re: Admin CSS not working

Post 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.
jke

Re: Admin CSS not working

Post 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
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: Admin CSS not working

Post 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.
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
Muzzy

Re: Admin CSS not working

Post 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.
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: Admin CSS not working

Post 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
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
Locked

Return to “[locked] Installation, Setup and Upgrade”