Projects ⇒ Bugs ⇒ #636: Pagination error if stories set to not display in Home ⇒ CPG Dragonfly™ CMS
Bug #636 Pagination error if stories set to not display in Home
Project: Dragonfly 9.0.3 -> 9.3 Category: News
Submitted: Friday, September 30, 2005 (16:29:47) Modified: Monday, June 12, 2006 (20:16:29)
Status: Closed Assigned to:
PHP Version: 4.3.11 HTTPD Server: Apache 1.3
Votes: 2
Vote results:
Avg. Score: 4.0 ± 1.0 Reproduced: 2 of 2 (100.0%)
Same PHP Version: 0 (0.0%) Same HTTPD Server: 0 (0.0%)

View/Vote Add Comment

by: layingback
Description:
------------
Current stable production release CPG-Nuke 9.0.6.1. (Site installed at this release, not an upgrade).

Pagination kicks in incorrectly:
if number of stories available to the user is greater than number of stories per page,
but the actual number of stories to display to the user is still less than number of stories per page - because some or all of the stories are set to "Do Not Publish in Home".


Reproduce code:
---------------
$storynum = (is_user() && $userinfo['storynum'] && $MAIN_CFG['member']['user_news']) ? $userinfo['storynum'] : $MAIN_CFG['global']['storyhome'];

Expected result:
----------------
On new site http://members.artsoutreach.net/ I have 11 stories created, but each is assigned to display only in each of the 11 Topics. I.e. the "Publish in Home" checkbox is cleared for each. Therefore I should see zero stories in Home. (Number of stories to display in Home is at the default value of 10.)

Thus pagination should be off (using Dragonfly theme).

Actual result:
--------------
Currently you can see on http://members.artsoutreach.net/ that no stories display (they can be verified as present if you select Topics from menu). However the pagination has turned on. I believe because the number of stories available in db is 11.

Code on line 66 of modules/NEWS/index.php
(see above) tests for how many stories user can see, and if News is set for Home page. But does not check whether all the stories the user is entitled to read will actually display in Home. It appears the code needs to check for number of stories to be Published, rather than simply available. (Required coding exceeds my expertise.)

I did confirm that line 66 of NEWS/index.php in CPG-Nuke 9.0.6.1 is same as currently in CVS (updated by Trevor to 9.5 2005/02/21).

[Note: I will try to hold off from publishing more than 9 new publish-to-home stories for a long as possible in order to give someone time to grab this problem, and still see the example. But as it is a pro bono work for a non-profit/charity, I'll not be able to delay much more than a week or so.)
by: DJ Maze
not reproducable at the moment
User Info

Welcome Anonymous



(Register)
Community

Support for DragonflyCMS in a other languages:

Deutsch
Español