Admin CSS still 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.
Locked
Michael AC

Admin CSS still not working...

Post by Michael AC »

Hi all,

the problem I am still trying to solve was intensively discussed here: http://forum.cmsmadesimple.org/index.ph ... 792.0.html.
(no styles on back-end)

1)
Problem appears with all(!) browsers: IE, FF, Opera.

2)
So I didn't try to delete the following in "style.php":

Code: Select all

if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match('/MSIE/', $_SERVER['HTTP_USER_AGENT']))
{
   @ini_set( 'zlib.output_compression','Off' );
}
Wouldn't be any help, I presume...
Anyway: Can someone "decode" this into human language for me? Kind of "...if blah and blubb happen then blahblubb."

Couldn't yet put this one...

Code: Select all

header("Content-type: text/css");
...into 1st position in the style.php (server is down at the moment, alas).

3)
The provider definitely has readfile() enabled (phpinfo-proofed).

4)
Changing "readfile()" to "echo file_get_contents()" in style.php and tab.php was only partly successfull -> styles on back-end home page ok, but not i.e. on back-end modules page...

5)
Viewing the pages source code with browser results in...

Code: Select all

<link rel="stylesheet" type="text/css" href="style.php" />
...what is definitely wrong for including a style sheet!
Seems that the server needs too much time decoding the style.php...

6)
On a different webspace with different provider sometimes(!) the same prob appears... and this one is a high quality provider! So maybe it really is a timing problem?!?

Ideas anyone? Maybe accelerating the style.php? What else?

BTW: CMSms release is 0.13 "Canary"

  Regards
    Michael AC
Michael AC

Re: Admin CSS still not working...

Post by Michael AC »

Hi all,

problem still exists...

- changing position of

Code: Select all

header("Content-type: text/css");
had no effect.

- deleting this what-so-ever-it-does-to-IE:

Code: Select all

if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match('/MSIE/', $_SERVER['HTTP_USER_AGENT']))
{
   @ini_set( 'zlib.output_compression','Off' );
}
...no success!

- changing this

Code: Select all

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

Code: Select all

<link rel="stylesheet" type="text/css" href="http://www.blahblubb.de/admin/themes/default/css/style.css" />
had a good effect on displaying the admin style... yawp(!) ...but not on "Extensions" -> "Modules". All I've got there was

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<__html><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
</__body><__body></__html>
A totally blank page... that's not really what I want...  :-\
Edit: Not even the debugger gives the slightest idea of a message on this page... annoying!

I'll give CMSms a last chance by re-installing. If it won't work... see you again on next CMSms non-beta release.

  Regards
    Michael
Last edited by Michael AC on Mon Sep 04, 2006 5:11 pm, edited 1 time in total.
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Admin CSS still not working...

Post by tsw »

If you look at style.php directly in browser (and hit refresh multiple times) can you get any errors?
Michael AC

Re: Admin CSS still not working...

Post by Michael AC »

tsw wrote: If you look at style.php directly in browser (and hit refresh multiple times) can you get any errors?
Hi tsw,

THX for asking.

No errors! Tried about 50 times refreshing.

Remarkable:

Page source code is just the same as with blank page on /admin/listmodules.php:

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<__html><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
</__body><__body></__html>
(Hmmm... where does this header come from? Any idea?)

Even when I add some more text into style.php, this text doesn't appear. Neither a simple "test" outside the PHP tags, nor a "phpinfo()" inside...

Tried to add some styles directly to the style.php:

Code: Select all

body {background-color:#ff0000;}
No success...

Re-install initiated. Report follows.

Regards
Michael
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Admin CSS still not working...

Post by tsw »

style.php should give onlu css information, no html markup at all..

any errors in server logs, and can you provide url and maybe send me some testing username/password as a pm
Michael AC

Re: Admin CSS still not working...

Post by Michael AC »

tsw wrote: style.php should give onlu css information, no html markup at all..
Hi tsw,

yes, when called by class.admintheme.inc.php.

But when addressed directly, it should be working as a normal .php file, shouldn't it? So text addons before header() should be shown...
tsw wrote: any errors in server logs, and can you provide url and maybe send me some testing username/password as a pm
Trying to find server logs.

Meanwhile read your pm box. ;-)

Regards
Michael
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Admin CSS still not working...

Post by tsw »

Michael AC wrote:
tsw wrote: style.php should give onlu css information, no html markup at all..
yes, when called by class.admintheme.inc.php.

But when addressed directly, it should be working as a normal .php file, shouldn't it? So text addons before header() should be shown...
Yep, it works like a normal php file, but it doesnt print any html code, just css styles (just like frontend style.php does) any text before header will show (if echoed) and after that there will be errors about headers already sent...

did check your site admin and styles worked perfectly (you got few screenshots in your pm box) ;)

Can you test with another computer?
Michael AC

Re: Admin CSS still not working...

Post by Michael AC »

tsw wrote: Yep, it works like a normal php file, but it doesnt print any html code, just css styles (just like frontend style.php does) any text before header will show (if echoed) and after that there will be errors about headers already sent...
Hi tsw,

that's the problem: Neither the simple "test" at the very beginning of style.php (before PHP tag) nor "echo 'Test';" within the PHP tags but before "header()" was shown. And no error message in slightest sight.
tsw wrote: did check your site admin and styles worked perfectly (you got few screenshots in your pm box) ;)
Yes, saw you moving...  ;D THX for shooting!
Problem is not admin homepage or loading styles.css directly. Changes to class.admintheme.inc.php (changing "/style.php" to ".../css/style.css" make it look and work ok..

Pls do me a favour and login again, surfing to Extensions -> Modules. If you can see something other than a blank page, pls. email me a screenshot again. If not: Welcome at the club!  ;D
tsw wrote: Can you test with another computer?
Tested it on this computer (W2k, firewall dis- and enabled), my laptop, my girlfriends imac and on the PC at my office... with IE, FF, Opera. Result is all the same. Alas!

Regards
Michael
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Admin CSS still not working...

Post by tsw »

Okay, now I got more information. Your server has display_errors=off AND log_errors=off. basically that means that there is an error in some php code but php wont tell what it is, it just dies silently thus leaving a white page.

try setting display_errors=on (you can try doing it in .htaccess but your host might not allow it, if it doesnt ask them to enable errors)

lets see what the error really is ;)
Michael AC

Re: Admin CSS still not working...

Post by Michael AC »

tsw wrote: Okay, now I got more information. Your server has display_errors=off AND log_errors=off. basically that means that there is an error in some php code but php wont tell what it is, it just dies silently thus leaving a white page.

try setting display_errors=on (you can try doing it in .htaccess but your host might not allow it, if it doesnt ask them to enable errors)

lets see what the error really is ;)
Hi tsw,

no chance: Provider isn't available at this time... .htaccess is available, but "display_errors=on" leads to "Internal Server Error".

There has to be another solution.

What about the following idea:

1)
To create a debug.php containing the php equivalence of these .htaccess lines:

Code: Select all

php_flag display_errors off
php_flag log_errors on
php_value error_log /www/path/to/site/logs/php_error.log
I don't know how to transfer this code into php...

2)
Including this debug.php somewhere into CMSms code (normally where the problem seems to occur... at the beginning of style.php or somewhere at listmodules.php etc.)

3)
Analyzing the php_errors.log.

Practicable solution?

Regards from Germany
Michael
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Admin CSS still not working...

Post by tsw »

If hosting company has prevented users from changing show errors state it cant be changed...

Its almost impossible to try and debug this without any information from php of what happened... sorry..
Michael AC

Aaaarrrgh!

Post by Michael AC »

tsw wrote: If hosting company has prevented users from changing show errors state it cant be changed...

Its almost impossible to try and debug this without any information from php of what happened... sorry..
Hi tsw,

finally I've got the providers support on the phone. They enabled the display_errors option... and that's it:

Code: Select all

Fatal error: Call to undefined function: registercontenttype() in /home/ftpxxxxxxxxxxx/www/data/test/modules/Album/classes/module/class.Album.php on line 90
YAWP! It was the "Album"... oh no, so much time for such a really unimportant thing. Gosh! Shoot me again!  ::)

Now I deinstalled the Album, changed back the style.php and class.admintheme.inc.php. And that's it! Everything is fine as if nothing has ever happened.

Thanks alot for your help! The hint with display_errors made it! Saved me a lot of time for reinstalling CMSms (and most likely running into the same error again)

Regards from Germany
Michael
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Admin CSS still not working...

Post by tsw »

Having errors disabled on server makes everything hard (including finding errors to use against a site ;)

Glad you got it working
Locked

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