As a companion to https://www.drupal.org/node/2123315, paging is broken with views_php-7.x-2.x-dev and views-7.x-3.11. 7.x-2.x-dev already seems to have the changes recommend in the 7.x-1.x issue but paging is broken. I've got this working in my site and it seems that all we need to do is get rid of update_wrapped_pager() in plugins/views/views_php_plugin_pager.inc
I don't know if that means anything about other functions being unnecessary but I'm including a patch to start with.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | views_php-2484407-10.patch | 817 bytes | ñull |
| views_php_pager.patch | 866 bytes | bkat |
Comments
Comment #1
caspervoogt commentedPatch works for me .. so far so good anyway.
Comment #2
sgp913 commentedSame here, the previous patches kept driving CPU to 100% immediately crashing the server. Going for an hour now with no issues on medium traffic site.
Could someone please do more testing and commit this as soon as possible? This is a serious issue and bkat seems to have fixed it. :-)
Comment #3
orangutangle commentedPatch works for me, thanks bkat.
Comment #4
rcodinaComment #5
rcodinaComment #6
rcodina@bkat I suggest to post your patch on issue #2123315 and close this one as a duplicate.
Comment #7
bkat commented#2123315 is for 7.x-1-x-dev and this is 7.x-2.x-dev. I do know that the patches posted in there do not work on 7.x-2.x.
Comment #8
fizk commented@bkat Can you comment on why update_wrapped_pager() can be removed without any ill effects?
Comment #9
bkat commentedJust empirical evidence from debugging the problem. I narrowed it down to that function, debugged the view and all the paging related data was correct and then was messed up by the function.
Most notably, there is no pager with that function and when its removed, the pager functions flawlessly.
Please note that I'm not using views_php for filtering, just for fields. It should probably tested with views_php filtering as well.
Comment #10
ñull commentedThe patch in #0 somehow did not apply here. I remade one here with GIT and attached it. Once applied the patch does what it promised to do.
Would like to know if this is really a condition before we can give it the "Reviewed" status? If so, how would views_php filtering be best tested? May be the module should be extended with a testing module for this?
Comment #11
jkdeveyra commentedI tried the patch on views_php filtering and the pager shows up even there's no result found.
Comment #12
afeijo#10 works for me, thanks
Comment #13
drupalshrek commented#10 (views_php-2484407-10.patch) works fine. Thanks!
Comment #14
drupalshrek commentedComment #15
nattyweb commentedI can confirm #10 worked for me too. Thank you.
Comment #16
elpino commentedIndeed the patch brings back pager and filtering works, but pagination is wrong... if a row is filtered out the page shows the wrong amount of rows.
Not sure if this is because of getting rid of the update_wrapped_pager() function though, but I think it is related.
Comment #17
peterlolty commentedComment #18
rcodinaThis is a duplicate of 2123315. So I close this one. We have to focus efforts on that one to get it commit for both branches.