samtiria / nextgen-gallery

Automatically exported from code.google.com/p/nextgen-gallery
0 stars 0 forks source link

Pagination problem in gallery view, images per page not remembered on subsequent pages #457

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create image library with enough images for multiple pages, like 60
2. Configure the default "images per page" to a value that will cause 
pagination, like 20, which should show the gallery with three pages
3. create a WP-page and include the gallery shortcode
[nggallery id=<theID> images=30]
4. this should create a gallery view with TWO pages, instead of three pages as 
the default value of 20 per page should create
5. The page will show correctly, 30 thumbnails and two page-ids with a next 
button to go to the second page
6. hit the next button (or the page-two button) and ...

What is the expected output? What do you see instead?

...the second page appears... but now nggallery forgot the overwritten 
parameter of 30 per page!
The second page will show, but with thumbnails 21-40, and now at the bottom of 
the thumbnails there are three pages listed, page 2 is active, page 1 could be 
selected and the next button will go to page three.

What version of the product are you using? On what operating system?

Using WP 3.3.1 and NGGallery 1.9.1 on Apache2.2/Linux, PHP 5.5

Please provide any additional information below.

Original issue reported on code.google.com by herbert....@googlemail.com on 7 Jan 2012 at 9:37

GoogleCodeExporter commented 8 years ago
I was just trying to recreate this bug. It seems that it only happens when ajax 
pagination is activated.

Original comment by kristian...@gmail.com on 8 Jan 2012 at 8:00

GoogleCodeExporter commented 8 years ago
Confirmed: switching off AJAX pagination works correctly. I've done that for 
now, still it would be nice to get the bug fixed as AJAX pagination is nicer 
and faster compared to full page reload.

Original comment by herbert....@googlemail.com on 8 Jan 2012 at 10:40

GoogleCodeExporter commented 8 years ago
I will look into this issue, this was just as far as I got this morning before 
I ran out of time.

Original comment by kristian...@gmail.com on 8 Jan 2012 at 8:16

GoogleCodeExporter commented 8 years ago
This is a design flaw from my side, the AJAX implemenation doesn't work with 
custom templates and additional parameters, which are set via the shortcode and 
not options.

See also issue 389 and issue 226

Original comment by alex.cologne on 9 Jan 2012 at 7:29

GoogleCodeExporter commented 8 years ago
That was exactly what I found out this morning when spending a little time to 
go through the code. 

Unless you have a solution coming I can give it a shot to see if I can figure 
out a reasonable solution for the problem.

/Kristian

Original comment by kristian...@gmail.com on 9 Jan 2012 at 7:33

GoogleCodeExporter commented 8 years ago
I have been thinking of a solution for this problem, and to be honest it is far 
from trivial to solve it. I have come up with two different strategies that 
might work.

1. We could embed the pagination info and theme name into the html and the pass 
it along with the request. I really dislike this option, as there is 
information that shouldn't be exposed.

2. Create a database entry with the information from the short codes. That 
means it will be possible to look the information up when the ajax request 
comes.

I think option 2 is better, but it is probably a bit out of my current comfort 
zone to make such a big change.

/Kristian

Original comment by kristian...@gmail.com on 13 Jan 2012 at 6:22

GoogleCodeExporter commented 8 years ago
Thanks Kristian,

I know both solution far away from a best solution. I'm rethink my AJAX 
integration, but it may needs some time

Original comment by alex.cologne on 14 Jan 2012 at 11:30