Topic: 2.0.1 pagination not displaying

Hello everybody,

I'm new to Cutenews so I don't know if this is a new issue that didn't appear in older versions. I've done in my website, still in localhost, the following include from cutenews:

<?php /*Here we decide what page to include*/

if ($_GET['search']){
include ("blog/search.php");
}
elseif ($_GET['do'] == 'archives'){
include ("blog/show_archives.php");
}
elseif ($_GET['do'] == "stats"){
echo "You can download the stats addon and include it here to show how many news, comments ... you have";
// include("$path/stats.php");
}
else{
$template = "my_template";
$number = 3;
include("blog/show_news.php");
}
?>

In my browser the posts display correctly using the layout I've designed in "my_template". As you can see I've choosen to show only 3 posts per page but there are more of them so I expect to see pagination controls (prev, ext, etc) beeing displayed somewhere in the page . The problem is that they aren't. They aren't displayed even using default template.
I don't know if I have to add some extra line of coding to achieve this, include pagination somehow or if I'm missing something. Does someone have any idea of what's happening? Thanks.

Re: 2.0.1 pagination not displaying

Hello everybody,

I'm new to Cutenews so I don't know if this is a new issue that didn't appear in older versions. I've done in my website, still in localhost, the following include from cutenews:

<?php /*Here we decide what page to include*/

if ($_GET['search']){
include ("blog/search.php");
}
elseif ($_GET['do'] == 'archives'){
include ("blog/show_archives.php");
}
elseif ($_GET['do'] == "stats"){
echo "You can download the stats addon and include it here to show how many news, comments ... you have";
// include("$path/stats.php");
}
else{
$template = "my_template";
$number = 3;
include("blog/show_news.php");
}
?>

In my browser the posts display correctly using the layout I've designed in "my_template". As you can see I've choosen to show only 3 posts per page but there are more of them so I expect to see pagination controls (prev, ext, etc) beeing displayed somewhere in the page . The problem is that they aren't. They aren't displayed even using default template.
I don't know if I have to add some extra line of coding to achieve this, include pagination somehow or if I'm missing something. Does someone have any idea of what's happening? Thanks.

The template should have a Pagination tab containing

<p align="center">[prev-link]<< Previous[/prev-link] {pages} [next-link]Next >>[/next-link]</p>

Also check System Configuration/News and make sure Pagination is not disabled.

It did not work for me (v2.0.1) - when the Next arrow was clicked, it just refreshed the page without showing the next page of items.
Likewise there is an issue with the Comments section in V2.0.1 which I have tried to draw attention of the script authors to in a separate post.

3 (edited by 2014-03-24 14:27:06)

Re: 2.0.1 pagination not displaying

The template should have a Pagination tab containing

<p align="center">[prev-link]<< Previous[/prev-link] {pages} [next-link]Next >>[/next-link]</p>

Also check System Configuration/News and make sure Pagination is not disabled.

It did not work for me (v2.0.1) - when the Next arrow was clicked, it just refreshed the page without showing the next page of items.
Likewise there is an issue with the Comments section in V2.0.1 which I have tried to draw attention of the script authors to in a separate post.


Thanks for replying.

Before starting the topic I did a lot of research in the help docs, the forums and navigating through all the options of the cutenews panel, and had already done what you're saying: my_template and default templates both have code in the "news pagination" section containing the required links and tags, and in the system configuration I've tryed to check and uncheck the "disable pagination" checkboxes. But pagination don't seem to show up. Even looking at the resulting html code there's nothing of it in the page.
To say more, I opened in my broswer the example page of cutenews and all my posts, lets say 10, where there. When setting $number to 3 and refreshing, as expected only 3 posts where displayed, but no pagination controls at all...
Normaly, do they have to be there automatically when there are more posts than those displayed? Or is there something I'm not setting right?

Re: 2.0.1 pagination not displaying

Not sure if you have done it, but run the migration PHP file inside your CuteNews folder and then deleting it.

The migration file is required to be run once for the news to be properly index. If you did not run it, the pagination will not display (from my personal experience).

Re: 2.0.1 pagination not displaying

Thanks. I did that just after installing cutenews, and I've done it again (re-unzipping the file) after reading your post just in case... But pagination controls are still inexistant. I have opened the example.php page on my browser and the problem is also there, so it doesn't come from the specific coding of my website.
I'm running on localhost but I don't think this has anything to do with that issue. Have any other idea?

Re: 2.0.1 pagination not displaying

I never run mine on local host at all. Your best bet now may be to try it on a live website. There shouldn't be any problem with the pagination at all so I guess the final culprit is that somehow testing the cutenews on local host, the paginaation isn't appearing.

Re: 2.0.1 pagination not displaying

Pagination is still inexistant even when having cutenews on a live server. The version I'm using is the latest available on cutenews website. I installed it from scratch, not migrating from older version. I'm starting to believe there is a bug somewhere in it. Does someone using exactly this version have the same isuue?

Re: 2.0.1 pagination not displaying

I don't have any problem with the pagination at all on two of my websites, just to let ye know.

Re: 2.0.1 pagination not displaying

Great. Maybe you can tell me if I'm missing something. Lets say I've got ten active posts, and in my blog page I write the following code

<? $template = "default";
     $number = "2";
     include (blog/show_news.php);
?>

This shows 2 posts from 10 I've got. Should I write something more to see pagination controls appear? Thanks.

10 (edited by 2014-03-26 13:41:52)

Re: 2.0.1 pagination not displaying

Try adding,

$PHP_SELF = "page.php";

whereas page.php is the file name where your CuteNews is located

before include.

Re: 2.0.1 pagination not displaying

So lets see, following the previous code, no I have:

<?php $template ="default";
$number = "3";
$PHP_SELF = "my_blog_page.php";
include ("log/show_news");
?>

Nothing has changed, I'm still seeing only 3 posts and unable to navigate to the next ones. Thanks anyway, maybe I should try a legacy version?

Re: 2.0.1 pagination not displaying

Try giving your include the full path, like home/user/blog/cms/show_news.PHP for example.

Avoid the legacy, it has more bugs then the current.

Re: 2.0.1 pagination not displaying

I've tried relative and absolute path in the include but I'm still stuck with this. I'll accept your advise on not giving a try to legacy versions.

Re: 2.0.1 pagination not displaying

Weird problem. Just to make sure you did a clean install of the current CuteNews, did migration after and nothing shows? Did you test CuteNews in a blank page without any web layout (since maybe the web layout is causing the pagination to disappear).

Again, post your full PHP code after adding the PHP self and path here.

Re: 2.0.1 pagination not displaying

I did the ultimate test to see what's going on:

- I downloaded again the zip file from cutephp.com, it's release date is march the 20th, 2014, just a week ago
- unzipped it straight in the "www" folder of wamp (I still believe that it's not a matter of local or live)
- opened in my browser localhost/index.php
- filed the installation form
- left website path as default
- added 6 test posts using "add news", each one of them with title, short story and page alias
- opened in my browser localhost/example.php, the 6 posts were there
- in the right side variables panel changed $number value to 2 clicked "check result", as expected only 2 posts were left in the page and... no pagination links to browse to the other posts
- so I opened in my browser localhost/migration_update_indexes.php, obtaining the "update success, remove this file" message
- deleted migration_update_indexes.php
- retried the example.php procedure and... no pagination links

What I believe is that 2.0.0 version released a few months ago don't have this issue, and that this is the one most people use. The very new 2.0.1 version from last week must have a flaw that have to be fixed. But I'm new to this, have limited knowledge and I may be wrong. In this case I'd like to know how to solve this problem.
Maybe I should try 2.0.0 version and see what happens.

Re: 2.0.1 pagination not displaying

Guess what. I downloaded 2.0.0 beta zip, did with it exactly all the steps that I described in my previous post and... the pagination links are finally there! This confirms that the very new version has a flaw. I suppose it's something easy to fix but that should be done by the developers orsomeone knowing where to search for it (my knowledge as I said is very limited). I'm posting this issue on the script feedback section to see if a fix arises from it.

17 (edited by 2014-03-27 09:56:35)

Re: 2.0.1 pagination not displaying

I am still interested to find out what caused the problem.

If you don't mind can you do another clean installation of 2.0, can you download the file from Github version and then replace every file from the gitHub to your Cutenews folder? After that do a migration and see if the pagination will show.

Re: 2.0.1 pagination not displaying

I am having the same issue with 2.0.1.  I however am not interested in backdating to a beta version, so I shall wait for an update.

Re: 2.0.1 pagination not displaying

Maybe the cdata folder has been updated in CuteNews 2.0.1.  I will compare the installation of the cdata folder of 2.0 and 2.0.1 tomorrow. I am thinking that the pagination is unable to show due to some error with the news indexes since there hasn't been any update to the pagination code so far.

Re: 2.0.1 pagination not displaying

I haven't tried yet what you've suggested, I've been somehow busy. Before starting this topic I did a similar thing. I downloaded from github core.php and some other recent files hopping they were bug-corrected, and replaced with them my original 2.0.1 version files. But nothing changed.
What I can try is to download 2.0 legacy version, install it and "update" it with files from github. Do you think this could work?
However I'm interested to see if you find out something checking the cdata folder. Please posts your findings.
I don't know if the guys from support team are aware of this bug. Is there a way to let them know? I've posted something in the Script feedback section but has received no reply.

Re: 2.0.1 pagination not displaying

By replacing the code in active_news.php with the old version 2 things happen:

- the pagination controls are finally displayed at the bottom of the page, but
- the pagination links don't work properly (I believe this bug has already been posted somewhere in thos forum), the number of posts displayed varies each time you click prev or next

So I guess the old code has been replaced to fix this bug, but the new code has a new bug on it.

Re: 2.0.1 pagination not displaying

Hi everyone,

This issue is still unsolved, does anyone know a fix for this bug (v.2.0.1 released on march the 20th 2014)? Thanks.

Re: 2.0.1 pagination not displaying

passive income online

Re: 2.0.1 pagination not displaying

I've maybe found the origin of the bug but I just don't know how it could be fixed.

In the active_news.php file, in line 85, if I replace

<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>$_cn = $rs['overall'];</div>

by a numerical value above the number of active news I have in my blog (for example 30)

<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>$_cn = 30;</div>

then the pagination is displayed and works fine (just the pages bar displays too much pages). So I think the bug is coming from the value of the rs array. Could this help the support team fix the bug?

Re: 2.0.1 pagination not displaying

what the heck... i mean, why support team not reacting at any way to this and other 2.0.1 related topics?! ...damn! they're not reacting to other topics as well, as i may see! WHAT THE...?!