[solved] full 1.4.1 - incomplete code in listcssassoc.php?

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
AmandaBTO
Forum Members
Forum Members
Posts: 51
Joined: Thu Aug 09, 2007 2:40 pm

[solved] full 1.4.1 - incomplete code in listcssassoc.php?

Post by AmandaBTO »

I've just downloaded the full 1.4.1 so I could upgrade 1.2.1 (I think) to 1.4.1

I backed everything up, moved all the new files over and ran the upgrade (after chmod'ing config.php)

My template css associations is giving me this error:
Fatal error: Call to a member function on a non-object in /home/liquidwe/public_html/goemans/admin/listcssassoc.php on line 191

line 191 has:
$count = $result->RecordCount();
and result comes from a db execute of
$query = "SELECT assoc_css_id, css_name, assoc_order FROM ".cms_db_prefix()."css_assoc ca INNER JOIN ".cms_db_prefix()."css ON assoc_css_id = css_id WHERE assoc_type=? AND assoc_to_id = ? ORDER BY ca.assoc_order";

... WHERE assoc_type=? AND assoc_to_id = ?
Really?  This can't be right
Last edited by AmandaBTO on Wed Aug 13, 2008 2:38 pm, edited 1 time in total.
alby

Re: full 1.4.1 - incomplete code in listcssassoc.php?

Post by alby »

AmandaBTO wrote: I've just downloaded the full 1.4.1 so I could upgrade 1.2.1 (I think) to 1.4.1

I backed everything up, moved all the new files over and ran the upgrade (after chmod'ing config.php)

My template css associations is giving me this error:
Fatal error: Call to a member function on a non-object in /home/liquidwe/public_html/goemans/admin/listcssassoc.php on line 191

line 191 has:
$count = $result->RecordCount();
and result comes from a db execute of
$query = "SELECT assoc_css_id, css_name, assoc_order FROM ".cms_db_prefix()."css_assoc ca INNER JOIN ".cms_db_prefix()."css ON assoc_css_id = css_id WHERE assoc_type=? AND assoc_to_id = ? ORDER BY ca.assoc_order";

... WHERE assoc_type=? AND assoc_to_id = ?
Really?  This can't be right
Have you run:  install/upgrade.php?

Alby
AmandaBTO
Forum Members
Forum Members
Posts: 51
Joined: Thu Aug 09, 2007 2:40 pm

Re: full 1.4.1 - incomplete code in listcssassoc.php?

Post by AmandaBTO »

Yes I did but does the install/upgrade really modify the listcssassoc.php file?
alby

Re: full 1.4.1 - incomplete code in listcssassoc.php?

Post by alby »

AmandaBTO wrote: Yes I did but does the install/upgrade really modify the listcssassoc.php file?
No, but ALTER your css tables

Alby
AmandaBTO
Forum Members
Forum Members
Posts: 51
Joined: Thu Aug 09, 2007 2:40 pm

Re: full 1.4.1 - incomplete code in listcssassoc.php?

Post by AmandaBTO »

I don't think there's anything wrong with my tables.  The php code in listcssassoc.php has:
... WHERE assoc_type=? AND assoc_to_id = ?

Literally, it has question marks in the string it's about to do a db execute on

And it's not just there.  There are question marks all through the file.  It's like someone put a place marker in the file and were going to get back to it later and then didn't

Seriously, am I the only one who's got this?
sebjames
New Member
New Member
Posts: 5
Joined: Thu Jul 06, 2006 11:38 am

Re: full 1.4.1 - incomplete code in listcssassoc.php?

Post by sebjames »

Just a me too - I get the same error after an upgrade from (I think) cmsms 1.0.4.
sebjames
New Member
New Member
Posts: 5
Joined: Thu Jul 06, 2006 11:38 am

Re: full 1.4.1 - incomplete code in listcssassoc.php?

Post by sebjames »

I tried manually running the query as shown in listcssassoc.php line 181 and got this error:

Code: Select all

mysql> SELECT assoc_css_id, css_name, assoc_order FROM cms_css_assoc ca INNER JOIN cms_css ON assoc_css_id = css_id WHERE assoc_type=? AND assoc_to_id = ? ORDER BY ca.assoc_order;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? AND assoc_to_id = ? ORDER BY ca.assoc_order' at line 1
It does seem like there's something wrong with the listcssassoc.php file...
alby

Re: full 1.4.1 - incomplete code in listcssassoc.php?

Post by alby »

sebjames wrote: I tried manually running the query as shown in listcssassoc.php line 181 and got this error:

Code: Select all

mysql> SELECT assoc_css_id, css_name, assoc_order FROM cms_css_assoc ca INNER JOIN cms_css ON assoc_css_id = css_id WHERE assoc_type=? AND assoc_to_id = ? ORDER BY ca.assoc_order;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? AND assoc_to_id = ? ORDER BY ca.assoc_order' at line 1
It does seem like there's something wrong with the listcssassoc.php file...
You must put valid data for ?
WHERE assoc_type=? AND assoc_to_id = ?

Alby
AmandaBTO
Forum Members
Forum Members
Posts: 51
Joined: Thu Aug 09, 2007 2:40 pm

Re: full 1.4.1 - incomplete code in listcssassoc.php?

Post by AmandaBTO »

alby wrote: You must put valid data for ?
WHERE assoc_type=? AND assoc_to_id = ?
Yes, we know that.  The problem is that the core listcssassoc.php file doesn't have any values there.  The php file from the downloaded gz file only has question marks
alby

Re: full 1.4.1 - incomplete code in listcssassoc.php?

Post by alby »

AmandaBTO wrote:
alby wrote: You must put valid data for ?
WHERE assoc_type=? AND assoc_to_id = ?
Yes, we know that.  The problem is that the core listcssassoc.php file doesn't have any values there.  The php file from the downloaded gz file only has question marks
Look at code, $query is a simple string, the row after will be execute:

Code: Select all

 $query = "SELECT assoc_css_id, css_name, assoc_order FROM ".cms_db_prefix()."css_assoc ca INNER JOIN ".cms_db_prefix()."css ON assoc_css_id = css_id WHERE assoc_type=? AND assoc_to_id = ? ORDER BY ca.assoc_order";
  $result = $db->Execute($query, array($type, $id));
and here there are $type and $id (values that substitute ?)

Alby
AmandaBTO
Forum Members
Forum Members
Posts: 51
Joined: Thu Aug 09, 2007 2:40 pm

Re: full 1.4.1 - incomplete code in listcssassoc.php?

Post by AmandaBTO »

Ahh, the light bulb just turned on

Fact of the matter is that I'm still getting
Fatal error: Call to a member function on a non-object in /home/liquidwe/public_html/goemans/admin/listcssassoc.php on line 191

And I now see it's because there's no assoc_order column added to the cms_css_assoc table

Guess the upgrade didn't actually upgrade everything even though it said it did.  I even tried running it again and it's still not there.  Time to add manually maybe


Edit:
The upgrade only goes to version 29 - The CMS database is up to date using schema version 29.
How do I get it to finish?

Edit again:
Aw crap!  My original ftp disconnected from the server before it copied some files over - ie version.php
It's all working now
Sorry and thanks for all your help!
Last edited by AmandaBTO on Wed Aug 13, 2008 2:37 pm, edited 1 time in total.
Pierre M.

Re: [solved] full 1.4.1 - incomplete code in listcssassoc.php?

Post by Pierre M. »

He... a (not CMSms specific) transfer problem again. People, remember to use the checksum files and/or the comparison feature of FileZilla. Uploading twice rather than once never hurts.

Pierre M.
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: [solved] full 1.4.1 - incomplete code in listcssassoc.php?

Post by Dee »

This doesn't seem to be only an FTP transfer problem.
I just upgraded a site from 1.3.1 to 1.4.1 - the upgrade script updated the database schema to version 31, but no assoc_order column was added to css_assoc table (resulting in loss of style on all pages and Fatal error: Call to a member function RecordCount() on a non-object in listcssassoc.php on line 191)
Last edited by Anonymous on Wed Oct 08, 2008 4:55 pm, edited 1 time in total.
Pierre M.

Re: [solved] full 1.4.1 - incomplete code in listcssassoc.php?

Post by Pierre M. »

Dee, is it reproducible ?
Please tell us more context info (hosting, sysinfo, logS, ...) to diagnose what went wrong.

Pierre M.
Locked

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