Jump to page Doesn't Match Nbr of Albums Jump to page Doesn't Match Nbr of Albums
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Jump to page Doesn't Match Nbr of Albums

Started by macmiller, June 03, 2011, 02:27:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

macmiller

When i look at User galleries section at the bottom right it displays 'Jump to page' and has numbers 1 to 5.  However if page 5 is selected there are no albums there (message 'There are no user galleries').  Page 4 shows albums up to the 3rd row, 3position.  I imagine this is because some users have deleted their albums altogether and therefore an entry is no longer displayed under User galleries, perhaps the Jump to page is still including them in its calculations?


macmiller

I tried to re-create this problem in my test environment by creating user gallery entries then deleting them or marking them viewable only by the owner, but was unsuccessful (in recreating the problem). 

You can see the problem on page 4 of the CPG user galleries here:
http://www.coolthaihouse.com/cthpics/index.php?cat=1&page=4
(note if a couple of new galleries get created the problem will no longer be evident/right now the 4th page has 11 entries)

I have had a brief look in phpmyadmin but not really sure what to look for and what could be causing the problem.  Any clues greatly appreciated. 

macmiller

here is a screen shot showing the extra page (screenshotshowingextrapage.JPG).  The last user gallery entry is on page 4 position 11 (for a total of 47 galleries).  Note there is nothing in position 12 (where the 48th gallery would go) and that there is no fifth page. 

If the 5th page is selected a message is returned 'There are no user galleries' (screenshotERRORPage5).

It would seem to me to be a bug in that the listing process should use the same data to determine which user galleries are selected and to determine the number of pages available.   

Αndré

Quote from: macmiller on June 04, 2011, 08:01:16 AM
I tried to re-create this problem in my test environment
Does your test environment was a stand-alone version of Coppermine or was it bridged as your productive gallery?


Quote50 users on 5 page(s)
Do you have exactly 50 users in your board?

macmiller

QuoteDoes your test environment was a stand-alone version of Coppermine or was it bridged as your productive gallery?[/url]
The test environment is a bridged version of coppermine.  It is a copy of the production Coppermine at a certain point in time.  IN that environment there are 47 users with albums.   If I have the thumbnail view/rows/columns set to the same as production with 4 columns 3 rows there is a message 47 users of 4 pages (for paging).  But when counting each page (12 + 12 + 12 and 8 on last page) it appears there are only 44 being displayed.   To make problem easier to see I set the row/column display to 1/4 in the test environment.   Display says 47s user on 12 pages(s) but seems to only be pulling up 44 on 11 pages with page 12 being blank.  URL to test board display of page 12 =http://www.coolthaihouse.com/zzcthpics110309/index.php?cat=1&page=12

QuoteDo you have exactly 50 users in your board?
There would be 50 users who have started galleries out of about 1000 users total.  However when computed by counting the galleries which actually display I come up with 47 (a difference of 3). 

Note the difference between actual galleries displayed and computed galleries for paging exists in both the production environment and test snapshot (difference = 3).   


Αndré

Can you give me access to phpMyAdmin or a similar tool so I can have a look at your database?

macmiller


macmiller

Hi Andre:

Have you had a chance to take a look at this?  Did you get my latest PM with the correct link to the root for phpMyAdmin?

Appreciate it.


Αndré

Quote from: macmiller on June 26, 2011, 09:06:45 AM
Have you had a chance to take a look at this?
Unfortunately, no.


Quote from: macmiller on June 26, 2011, 09:06:45 AM
Did you get my latest PM with the correct link to the root for phpMyAdmin?
Yes. I'll have a look asap.

macmiller

I figured out what was going on.  When one lists the 'User galleries' there is a computed number of users shown on the bottom, eg. '48 users on 4 page(s)'.  What was happening was that this computed number of users was different (more) than the actual number of user galleries displayed, which led to the paging problem I initially mentioned.

This problem is related to bridging, in the bridged user database 3 of the users have been 'pruned' which is a common practice for users who have been inactive for a long period of time (will add check on the forum side now to make sure there are no galleries prior to pruning the inactive user).  That being said, the program computing the number of user galleries should be modified to check to see if the user still exists so that in this case where users have be pruned both the computation of total users and the users displayed would agree.