I am using an ajax view as view pane with exported settings for the pager. I set a different items per page setting in the view compared with the default one from the view and initially when the view pane is rendered on page it takes the view pane settings but when I start to paginate it takes the view pager settings.

I found a discussion about similar issue Ajax + Allow settings: Allowed settings lost on ajax (exposed forms/pager) for the ctools module but I think that is more view related.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

boyan.borisov’s picture

Status: Active » Needs review
FileSize
1.17 KB

I found a solution that handles the items_per_page setting.
My idea is to add the items_per_page setting in the view ajax POST parameters and to use this parameter in the ajax view callback to set the correct setting.

Anybody’s picture

The problem still exists and I think a solution is really required. Can someone perhaps have a look, how to solve this properly?

If there is already a good solution, an example implementation would help a lot, because this problem doesn't seem to be that seldom.

Anybody’s picture

I've used this patches base idea for a related problem and it works great.
#2052985: AJAX reload does NOT respect pager settings (items_per_page, etc.)

If this patch is finally applied to views, the related issue should be updated and becomes much smarter or is even no more required.

mansspams’s picture

jelo’s picture

Same issue on my sites. Would be great to get a solution committed... I will try the patch soon.

Loparev’s picture

hi. I have improved your patch

rkostov’s picture

The patches do not apply to 7.x-3.18 version. This was re-created from the first one and it's applicable to 7.x-3.18 version.

jedsaet’s picture

Patch in #7 worked for me, I just had to re-roll against dev. Fixed a couple of coding standards issues while I was at it. :)