Page 1 of 1
SQL error in listcssassoc.php
Posted: Tue Dec 02, 2008 8:48 pm
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
P.S. I did run the checksum test during install and it passed. It has let me create and modify files.
Re: SQL error in listcssassoc.php
Posted: Tue Dec 02, 2008 9:41 pm
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
Re: SQL error in listcssassoc.php
Posted: Tue Dec 02, 2008 9:48 pm
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

Re: SQL error in listcssassoc.php
Posted: Tue Dec 02, 2008 9:54 pm
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
Re: SQL error in listcssassoc.php
Posted: Tue Dec 02, 2008 10:10 pm
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

Re: SQL error in listcssassoc.php
Posted: Tue Dec 02, 2008 10:18 pm
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
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.
Re: SQL error in listcssassoc.php
Posted: Tue Dec 02, 2008 11:24 pm
by alby
benjamin72070 wrote:
alby, the subject line is the error message verbatim.
ok, now is clear.
Take and look
Alby
Re: SQL error in listcssassoc.php
Posted: Tue Dec 02, 2008 11:43 pm
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
Re: SQL error in listcssassoc.php
Posted: Wed Dec 03, 2008 2:53 am
by smyth
I had the same problem.
The above solution fixed it.
The error comes with the 1.5.
Re: SQL error in listcssassoc.php
Posted: Wed Dec 03, 2008 3:43 am
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