Kunena 6.2.5 & module Kunena Latest 6.0.7 released

The Kunena team has announce the arrival of Kunena 6.2.5 [K 6.2.5] which is now available for download as a native Joomla extension for J! 4.3.x/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 Warning: Division by zero in /default_ex/flat.php on line 207 & 208

More
14 years 9 months ago #1 by tariq
Hello,

After upgrade to k 1.0.10 & Cb 1.2.1, I am receiving this error (check attachment) when I brows a category in the forum:

Warning: Division by zero in /home/abc/public_html/components/com_kunena/template/default_ex/flat.php on line 207

Warning: Division by zero in /home/abc/public_html/components/com_kunena/template/default_ex/flat.php on line 208


Any advice,

Thanks
Attachments:

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

More
14 years 9 months ago - 14 years 9 months ago #2 by Lintzy
could you please give us the following information, we (= Kunena Team) are collecting all facts around this category bugs - thank you very much!

Which Joomla Version?
Last edit: 14 years 9 months ago by Lintzy.

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

More
14 years 9 months ago #3 by tariq
Hello,

Lintzy wrote:

Which Joomla Version?


Joomla 1.5.11

Thanks,

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

More
14 years 9 months ago #4 by Lintzy
ahhhhhh, you just pointed me, to Joomla update 1.5.11, i did not realize it yet.

Thank you! :laugh:

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

More
14 years 9 months ago - 14 years 9 months ago #5 by xillibit
Hello,

I have just tested Kunena 1.0.10 on Joomla! 1.5.11 and I haven't this problem, I think it's related to community builder, try to disable it for tested. With CB there are a lot problems...
But it's possible too that CB doen't cause this problem.

I don't provide support by PM, because this can be useful for someone else.
Last edit: 14 years 9 months ago by xillibit.

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

More
14 years 9 months ago #6 by tariq
Hello,

xillibit wrote:

I think it's related to community builder, try to disable it for tested.


Did that, didn't work :(

I also don't think it's related to J1.5.11, as the error showed when I upgraded from K1.0.9 to K1.0.10, and I was using J1.5.10 then, and I thought upgrading to J1.5.11 will solve it, but unfortunately not.

Anyway, the lines from 201 to 209 in /com_kunena/template/default_ex/flat.php is as fallow :
Code:
201 <?php 202 if ($leaf->moved == 0) 203 { 204 // Need to add +1 as we only have the replies in the buffer 205 $totalMessages = $thread_counts[$leaf->id] + 1; 206 $curMessageNo = $totalMessages - ($last_read[$leaf->id]->unread ? $last_read[$leaf->id]->unread-1 : 0); 207 $threadPages = ceil($totalMessages / $fbConfig->messages_per_page); 208 $unreadPage = ceil($curMessageNo / $fbConfig->messages_per_page); 209 ?>

Is it correct or I need to change something?

Thanks,

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

More
14 years 9 months ago - 14 years 9 months ago #7 by kai920
Same issue for me. I am on J 1.5.11 as well but was working fine until I disabled the 2 help page options. My thread is here: www.kunena.com/forum?func=view&catid=92&id=18509

I don't have CB but have Jomsocial.
Last edit: 14 years 9 months ago by kai920.

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

More
14 years 9 months ago - 14 years 9 months ago #8 by kai920
tariq wrote:

Anyway, the lines from 201 to 209 in /com_kunena/template/default_ex/flat.php is as fallow :

Code:
201 <?php 202 if ($leaf->moved == 0) 203 { 204 // Need to add +1 as we only have the replies in the buffer 205 $totalMessages = $thread_counts[$leaf->id] + 1; 206 $curMessageNo = $totalMessages - ($last_read[$leaf->id]->unread ? $last_read[$leaf->id]->unread-1 : 0); 207 $threadPages = ceil($totalMessages / $fbConfig->messages_per_page); 208 $unreadPage = ceil($curMessageNo / $fbConfig->messages_per_page); 209 ?>

Is it correct or I need to change something?

Thanks,


Ah , I fixed it! Thanks to the posted code I see that it's looking for messages_per_page. For some reason mine was reset to 0! Something must have happened when I disabled the 2 help options.

Double check your Messages per page option in Kunena to make sure it is not 0.

Perhaps the code should be modified to use 1 if this option is set to "less than 1"?
Last edit: 14 years 9 months ago by kai920.

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

More
14 years 9 months ago #9 by tariq
Hello Everyone,

I have solved the problem by uploading the templates files again from K.1.0.10 archive.

Thanks :cheer:

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

Time to create page: 0.388 seconds