* Create a view with a pager and make sure the results span multiple pages
* Create a new PHP filter handler whose code is:

return TRUE;

* Run the view: no results will show on the page, but the pager is still showing as if all results were there.

The PHP filter handler should adjust the pager based on the filtered results.

Comments

infojunkie’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
infojunkie’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Active » Patch (to be ported)

Committed to latest dev. To be ported to D7 - which will not be straightforward because the code is different.

The idea of the fix is to create a pager helper object, stored in the view, that does the following:
* On pre_execute, instruct the view to retrieve all results instead of paged results
* On post_execute, re-paginate the view

The various PHP handlers flag their need for this pager via the $view->use_pager_helper flag, that is processed by views_php.module's hook_views_pre_execute.

lquessenberry’s picture

Issue summary: View changes

I am getting the same results in Drupal 7. I am not sure what to do to fix it. Has there been anything done to fix this in D7?

infojunkie’s picture

No, I've dropped out of maintaining Views PHP a long time ago. I doubt I can look at it again. Sorry!

lquessenberry’s picture

Do you recall if anyone ever ported this to D7 and just didn't update this thread?

infojunkie’s picture

I doubt it - but I see there's a new module maintainer, maybe you'd like to contact them.