This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

I'm not sure if this is a bug but...
#1

Hello.
Thank you for your great efforts on Commentics. It's fantastic.

I saw an error when I turned on error reporting.

When there's no comment in a page (dynamic website), and both the top and bottom pagination is active, I get this error: (I think it's related with bottom pagination)

Notice: Undefined variable: cmtx_total_pages in /home4/otuzelco/public_html/SUB/fxrehber/comments/includes/template/comments.php on line 688 you can see it here

Maybe it's because of my modifications on the code but I am not sure so I wanted to post it.
Thank you.
Reply
#2

Hi,

I tried but I couldn't replicate this error. If there are no comments, then it should never reach the code where the variable $cmtx_total_pages is used. In /comments/includes/template/comments.php this is a simplified version of what should happen:

PHP Code:
<?php 
if ($cmtx_number_of_comments == 0) { //if no comments
echo "<span class='cmtx_no_comments_text'>";
echo
CMTX_NO_COMMENTS;
echo
"</span>";
} else {
//if there are comments

$cmtx_total_pages = ceil($cmtx_number_of_comments / $cmtx_settings->comments_per_page);

}

Check whether your modifications to the code may have affected this.

I couldn't see the error on your page. Maybe you resolved it since posting?

Have you completed the interview?
Reply
#3

Hello, thanks for the reply.
Yes you are right, I missed it.
It's because of my code and I found what causes this.
Now there's no error.
Sorry for that.
Thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)