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

Pagination problem
#1

Hi guys

Actually I've got pagination problem, only the comments in page 1 are displyed, but page two or more it shows No comments yet.

also that happens when I try to see the oldest or newest comments it shows No comments yet, but I'm sure there is a comments in those pages but are not displayed.

Thank you
Reply
#2

Hi,

I can only guess that the $page_id value in your integration code is not the same on the second page as it is on the first page.

Have you completed the interview?
Reply
#3

this is the $page_id = "http://www.mydomain.com".$_SERVER['REQUEST_URI'];
do i need to change that?
Reply
#4

Yes that's the issue. With the way that you've set it up, the below URLs would result in different $page_id values.

domain.com/page.php
domain.com/page.php?cmtx_page=2
domain.com/page.php?sort_by=5

Have you completed the interview?
Reply
#5

In your integration code, after this:

PHP Code:
<?php 
$page_id
= "http://www.mydomain.com".$_SERVER['REQUEST_URI'];

Try adding this:

PHP Code:
<?php 
$page_id
= preg_replace("/&cmtx_page=[0-9]*/", "", $page_id);
$page_id = preg_replace("/cmtx_page=[0-9]*&/", "", $page_id);
$page_id = preg_replace("/cmtx_page=[0-9]*/", "", $page_id);

$page_id = preg_replace("/&cmtx_sort=[0-9]*/", "", $page_id);
$page_id = preg_replace("/cmtx_sort=[0-9]*&/", "", $page_id);
$page_id = preg_replace("/cmtx_sort=[0-9]*/", "", $page_id);

Have you completed the interview?
Reply
#6

Thank you Steven
it works well
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Norbs
06-Jun-2011, 10:59 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)