Kunena 6.2.6 released

The Kunena team has announce the arrival of Kunena 6.2.6 [K 6.2.6] which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x. This version addresses most of the issues that were discovered in K 6.1 / K 6.2 and issues discovered during the last development stages of K 6.2

Question category page shows white page

More
14 years 10 months ago #11 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
14 years 10 months ago #12 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
14 years 10 months ago #13 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
14 years 10 months ago - 14 years 10 months ago #14 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: 14 years 10 months ago by sozzled.

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

More
14 years 10 months ago #15 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
14 years 10 months ago #16 by Matias
Not solved before I get my answer. :)

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

More
14 years 10 months ago #17 by djackso1
Matias wrote:

Not solved before I get my answer. :)


I'm not sure what you need Matias. I was able to fix my problem by adding the single quotes as mentioned in my previous post. Please let me know if there is anything else I can provide that will help you.

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

More
14 years 10 months ago #18 by Matias
I just need output of:

echo "prevCheck: '$prevCheck'";

When you get that error.

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

More
14 years 10 months ago #19 by djackso1
Matias wrote:

I just need output of:

echo "prevCheck: '$prevCheck'";

When you get that error.


Sorry Matias, I'm kind of lost. My issue has been solved. I no longer get the error. After I added the single quotes (see my previous post) my problem was solved.

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

More
14 years 10 months ago #20 by Matias
You just fixed symptoms. We need to track down if there's a real issue in there. Can you add that line just before the first fix. Also temporally remove quotes to see if you really catch it.

Most likely there's nothing serious in there, but I need to know if that variable contains something that it should not.

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

Time to create page: 0.411 seconds