[fixed] Paging Troubles.... Help! [fixed] Paging Troubles.... Help!
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

[fixed] Paging Troubles.... Help!

Started by JSpecMugen, April 14, 2004, 07:18:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JSpecMugen

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
When I page through (with the variable page=x) I stay on the first page for some reason.

Anyone have any ideas?

Casper

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.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

JSpecMugen

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.

JSpecMugen

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!

Casper

Did you actually change the code as tarique said, not just adding the last line, but removing '$PAGE,' from line 2.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

JSpecMugen

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.

Casper

It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here