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

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
Bas

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

Post 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
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

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

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

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

Post 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?
Locked

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