coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: JSpecMugen on April 14, 2004, 07:18:34 PM

Title: [fixed] Paging Troubles.... Help!
Post by: JSpecMugen on April 14, 2004, 07:18:34 PM
I seem to be having a weird issue with my album lists not paging properly. It seems to occur only in one particular category.

Please keep in mind my website IS NOT WORK SAFE.

This is the base category I am having problems with: Here (http://www.2nr.net/index.php?cat=6)
When I page through (with the variable page=x) I stay on the first page for some reason.

Anyone have any ideas?
Title: [fixed] Paging Troubles.... Help!
Post by: Casper on April 14, 2004, 08:52:46 PM
Strange.  I can confirm that when in this category, which contains 39 albums plus 2 sub-categories with more albums, the link to ?cat=6&page=2 (or 3 or 4) all result in page 1 being displayed, but with the url showing the page you requested.
Title: [fixed] Paging Troubles.... Help!
Post by: JSpecMugen on April 14, 2004, 09:21:39 PM
QuoteStrange. I can confirm that when in this category, which contains 39 albums plus 2 sub-categories with more albums, the link to ?cat=6&page=2 (or 3 or 4) all result in page 1 being displayed, but with the url showing the page you requested.

Defiantely.
There haven't been any modifications to backend code nor the database. I can also recall it working correctly a day or two ago. The only things i've done since then was to add an additional 10 albums aswell as sub-categorize the "Girls" section.

It's really odd.
Title: [fixed] Paging Troubles.... Help!
Post by: JSpecMugen on April 14, 2004, 11:04:57 PM
I also saw in the Sticky section right above this a user name danielg was having the same problems with their paging.

I saw that there was a snippet of code that Tarique suggested to change:

function list_cat_albums($cat = 0)
{
    global $CONFIG, $USER, $PAGE, $lastup_date_fmt, $HTTP_GET_VARS, $USER_DATA;
    global $lang_list_albums, $lang_errors;  


to

function list_cat_albums($cat = 0)
{
    global $CONFIG, $USER, $lastup_date_fmt, $HTTP_GET_VARS, $USER_DATA;
    global $lang_list_albums, $lang_errors;
    $PAGE = 1;  


However, my code already looks like this:

function list_cat_albums($cat = 0)
{
    global $CONFIG, $USER, $PAGE, $lastup_date_fmt, $HTTP_GET_VARS, $USER_DATA;
    global $lang_list_albums, $lang_errors;


It has the $PAGE defined but it doesn't $PAGE = 1; , and if I add that PAGE = 1 var... It doesn't make any difference.

I CAN however say that the problem exists ONLY when a paging in a category that has sub-categories.

Anyone have any further ideas? I'm gonna go check out the bug tracker and see what people say there.

Thanks!
Title: [fixed] Paging Troubles.... Help!
Post by: Casper on April 14, 2004, 11:51:38 PM
Did you actually change the code as tarique said, not just adding the last line, but removing '$PAGE,' from line 2.
Title: [fixed] Paging Troubles.... Help!
Post by: JSpecMugen on April 15, 2004, 12:16:33 AM
Quote from: "casper"Did you actually change the code as tarique said, not just adding the last line, but removing '$PAGE,' from line 2.

My bad. I didn't read carefully.

Thanks for the support casper.
Title: [fixed] Paging Troubles.... Help!
Post by: Casper on April 15, 2004, 12:22:16 AM
Glad to of helped.