Page 1 of 1

[CMSMS 0.12] Upgrade from 0.11.2 to 0.12 => stylesheet.php outputs nothing!

Posted: Tue Mar 14, 2006 9:50 pm
by Bas
Hi there,

I have just upgraded CMSMS from 0.11.2 to 0.12 and found that the stylesheet is missing. Calling stylesheet.php directly in my browser showed an empty page. The PHP error-log showed the messages below:

Code: Select all

[14-Mar-2006 22:18:45] PHP Notice:  Trying to get property of non-object in /Volumes/Data/www_root/cmsms/stylesheet.php on line 47

[14-Mar-2006 22:18:45] PHP Notice:  Trying to get property of non-object in /Volumes/Data/www_root/cmsms/stylesheet.php on line 49

[14-Mar-2006 22:18:46] PHP Fatal error:  Call to a member function MoveNext() on a non-object in /Volumes/Data/www_root/cmsms/stylesheet.php on line 50
I'm not familiar with the code, so can anybody tell me what is going wrong here?

Thanks in advance!

Bas

Re: [CMSMS 0.12] Upgrade from 0.11.2 to 0.12 => stylesheet.php outputs nothing!

Posted: Tue Mar 14, 2006 11:35 pm
by Ted
Open up stylesheet.php.  On code 47 is

Code: Select all

    while (!$cssresult->EOF)
.  Change it to

Code: Select all

    while ($cssresult && !$cssresult->EOF)
.  This will be fixed in the next release.

Re: [CMSMS 0.12] Upgrade from 0.11.2 to 0.12 => stylesheet.php outputs nothing!

Posted: Fri Mar 17, 2006 9:11 pm
by Bas
Hi Ted,

Thanks for your reply. Sadly though, it did remove the error messages, but didn't solve my problem; the stylesheet still isn't shown.

Below a piece of the code with my remarks after a #:

Code: Select all

if ($name != '') # echo $name => "Praktijk_het_Haagje" which is also present in the css table.
{
	//TODO: Make stylesheet handling OOP
	global $gCms; # echo $gCms => Object id #1
	$db =& $gCms->GetDb();  # echo $db => Object id #2

	$cssquery = "SELECT css_text FROM ".cms_db_prefix()."css WHERE css_name = ?";
        # echo $cssquery => "SELECT css_text FROM css WHERE css_name = ?"
	$cssresult = &$db->Execute($cssquery, $name); # echo $cssresult => ""
	while ($cssresult && !$cssresult->EOF)
	{
                # this code simply isn't executed anymore....
		$css .= "\n".$cssresult->fields['css_text']."\n";
		$cssresult->MoveNext();
	}
}
Any more suggestions Ted? Anybody else?