SQL error 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
benjamin72070
Forum Members
Forum Members
Posts: 10
Joined: Tue Dec 02, 2008 8:04 pm

SQL error in listcssassoc.php

Post by benjamin72070 »

I am getting this error any time I try to attach a stylesheet to a template that does not already have a stylesheet attached.  Just installed the new CMSMS 1.5

Regards,

Ben    ;D ;D ;D

P.S.  I did run the checksum test during install and it passed.  It has let me create and modify files.
Last edited by benjamin72070 on Tue Dec 02, 2008 9:06 pm, edited 1 time in total.
alby

Re: SQL error in listcssassoc.php

Post by alby »

benjamin72070 wrote: I am getting this error any time I try to attach a stylesheet to a template that does not already have a stylesheet attached.
Can you report this error?

Alby
benjamin72070
Forum Members
Forum Members
Posts: 10
Joined: Tue Dec 02, 2008 8:04 pm

Re: SQL error in listcssassoc.php

Post by benjamin72070 »

What do you mean by report this error?  I thought that was what I was doing.  Is there a procedure for reporting bugs?

Regards,

Ben  ;D
alby

Re: SQL error in listcssassoc.php

Post by alby »

benjamin72070 wrote: What do you mean by report this error?  I thought that was what I was doing.  Is there a procedure for reporting bugs?
It's difficult to do support without any info on this error.
Can you report (display) this sql error (sql query of your DB or more infos)

If you have a forge account you can report here too but with more infos

Alby
benjamin72070
Forum Members
Forum Members
Posts: 10
Joined: Tue Dec 02, 2008 8:04 pm

Re: SQL error in listcssassoc.php

Post by benjamin72070 »

OK, I get the following anytime that I click on the option to attach a stylesheet to a template.  It does not matter what screen I start from.  If the template does not already have a stylesheet attached, this is what I get.

Regards,

Ben  ;D
Attachments
sqlerror.PNG
benjamin72070
Forum Members
Forum Members
Posts: 10
Joined: Tue Dec 02, 2008 8:04 pm

Re: SQL error in listcssassoc.php

Post by benjamin72070 »

alby, the subject line is the error message verbatim.  I am suspecting that when the file listcssassoc.php runs a SQL command to query the list of attached stylesheets and finds none attached, it errors out instead of displaying the page to attach a stylesheet.  I know a little PHP and SQL, but not enough to know what line in that file is the code that is faulting.  CMSMS does not give the SQL error, just this generic failure message.

Regards,

Ben   ;D ;D

A little more info for you:  Version 1.4.1 did not do this on the exact same server so I do not see how it could be PHP settings unless your implementation of the script uses different modules than the old one.
Last edited by benjamin72070 on Tue Dec 02, 2008 10:31 pm, edited 1 time in total.
alby

Re: SQL error in listcssassoc.php

Post by alby »

benjamin72070 wrote: alby, the subject line is the error message verbatim.
ok, now is clear.
Take and look

Alby
alby

Re: SQL error in listcssassoc.php

Post by alby »

Replace in #194 of listcssassoc.php:
  if ($result && $result->RecordCount() > 0)
  {
with:
  if ($result )
  {
  if ($result->RecordCount() > 0)

  {
and add in #229:
  }
  }
  else
  {
redirect('listtemplates.php'.$urlext.'&message='.lang('sqlerror', 'listcssassoc.php'));
  }
Alby
smyth

Re: SQL error in listcssassoc.php

Post by smyth »

I had the same problem.

The above solution fixed it.

The error comes with the 1.5.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: SQL error in listcssassoc.php

Post by RonnyK »

This is fixed in SVN....

Only when running with a template that has NO stylesheet attached, is the error there...

You can bypass this by attaching a stylesheet through the stylesheets list, and attach it to a template from there, from then will it work.

Ronny
Locked

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