Kunena 7.0.6 & Kunena 6.4.12 – Security Updates Released

The Kunena team has announce the arrival of Kunena 7.0.6 [K 7.0.6] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0.

The Kunena team is also pleased to announce the twelfth version of Kunena 6.4, a native Joomla extension for Joomla! 5.0, 5.1, 5.2, 5.3, 5.4 and 6.0.

Question category page shows white page

More
17 years 1 week ago #18470 by djackso1
djackso1 wrote:

Additional Information:



I turned debug on for the site and the following error message is created when navigating to the 'Categories' view on the forum as a logged in Registered user:

Notice: 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 'group by thread' at line 1 in /home/usatf5/public_html/includes/database.php on line 307

/home/usatf5/public_html/includes/database.php:498
/home/usatf5/public_html/components/com_kunena/template/default_ex/listcat.php:269
/home/usatf5/public_html/components/com_kunena/kunena.php:689
/home/usatf5/public_html/index.php:236

I'll keep testing and report back if I find anything. -Dave



A couple of small edits to the listcat.php file and everything is working as expected for me. Here is what I did:

Changed line 270 from this:
$database->setQuery("SELECT DISTINCT thread from #__fb_messages where catid=$singlerow->id and hold=0 and moved=0 and time>$prevCheck group by thread");

To This:
$database->setQuery("SELECT DISTINCT thread FROM #__fb_messages WHERE catid='$singlerow->id' AND hold=0 AND moved=0 and time>'$prevCheck' GROUP BY thread");

AND, Changed line 466 from this:
$database->setQuery("SELECT thread from #__fb_messages where catid=$forumparent->id and hold=0 and time>$prevCheck group by thread");

To This:
$database->setQuery("SELECT thread FROM #__fb_messages WHERE catid='$forumparent->id' AND hold=0 AND time>'$prevCheck' GROUP BY thread");

Please Log in or Create an account to join the conversation.

More
17 years 1 week ago #18492 by sozzled
Thank you for posting your solution. :woohoo:

That is bizarre! In your case, merely capitalising the SQL keywords FROM, WHERE and AND is what fixed the problem (and I always though that SQL queries were case insensitive! :huh: ). I still believe that there's a fundamental issue for Kunena 1.0.10 involving Joomla 1.0 - as much as your particular version MySQL seems to be involved - so I wonder how many other instances of SQL statements lurk in Kunena (and goodness knows how many other Joomla extensions you may be using) that would need this same correction to be made? :S

Congratulations and well done! B)

Please Log in or Create an account to join the conversation.

More
17 years 1 week ago #18494 by djackso1
sozzled wrote:

Thank you for posting your solution. :woohoo:

That is bizarre! In your case, merely capitalising the SQL keywords FROM, WHERE and AND is what fixed the problem (and I always though that SQL queries were case insensitive! :huh: ). I still believe that there's a fundamental issue for Kunena 1.0.10 involving Joomla 1.0 - as much as your particular version MySQL seems to be involved - so I wonder how many other instances of SQL statements lurk in Kunena (and goodness knows how many other Joomla extensions you may be using) that would need this same correction to be made? :S

Congratulations and well done! B)


Thanks, its always nice to be able to give back.

I'm not an SQL expert, but I believe adding the single quotes around $prevCheck made a difference too.

Please Log in or Create an account to join the conversation.

More
17 years 1 week ago - 17 years 1 week ago #18496 by sozzled
My apologies: my poor eyesight first thing in the morning ... old age, you know! :laugh:

Yes, using a quoted text string makes a huge difference. The odd thing, though, is that I haven't found your problem (after several days testing on a Joomla 1.5.7 website). I wonder why that would be? :S And, technically-speaking, it's not just SQL that's involved: it's PHP, too.
Last edit: 17 years 1 week ago by sozzled.

Please Log in or Create an account to join the conversation.

More
17 years 5 days ago #18970 by Matias
Yes, it's the $prevCheck variable. Could you please echo it and give the result back to me?

BTW: karma up!

Please Log in or Create an account to join the conversation.

More
17 years 4 days ago #19088 by Matias
Not solved before I get my answer. :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.256 seconds