Just upgraded to Alpha 2 and find that my views no longer respect the setting to display a specific number of results. Not done a full analysis yet but thought I should flag it immediately as this is such a new release. Have rolled back to Alpha 1 for now.
Comments
Comment #2
fizk commentedAre you simply using "Display a specified number of items" under Pager to limit the number of results?
Comment #3
stevetheboater commentedYes, it's a very simple view of fields from a specific node type but regardless of the setting I use, all results are displayed.
Comment #4
SRampley commentedI had the same issue on updating to the latest version.
This is due to the new hook implementation in the module file.
Comment #6
fizk commentedI've committed this to 7.x-1.x-dev:
https://www.drupal.org/commitlog/commit/17562/b348878140641e0eadd6486abf...
Let me know if it works for you.
Comment #8
stevetheboater commentedIf I apply that patch to 7.x-1.x-dev it works fine, thanks :)
Comment #9
fizk commentedGreat :)
Comment #10
redeight commentedThis is still broken as far as I can tell... Limits are being ignored and the query isn't adding LIMIT anywhere.... I'm on 7.x-1.0-alpha2+1-dev
To fix it, I commented out the line containing '->range()' and it went back to working... Why are we nuking this in the first place?
Comment #11
redeight commentedMarking as needs work because it still seems to break any view with a limit.
Comment #12
pandroid commented+1. Breaks both normal views and blocks.
It looks like it displays all the entries instead of paging it, but if you page it you get the same entries all over again.
Comment #13
stevetheboater commentedI used the dev release but manually applied the patch referred to in #6 and that seemed to fix it for me. @fizk does the dev version need to be rolled again so that your fix can be used out of the box?
Comment #14
yalh commentedThanks fizk, it works for me.
You saved my night ^^
Comment #15
fizk commented@stevetheboater I thought I published an alpha3 release this morning, but it doesn't seem to be showing up. I'm trying to figure out what's going on...
Comment #16
fizk commented@RedEight @pandroid Do you have the following code in
views_php.module:Comment #17
fizk commentedIt seems Drupal.org has been having issues building releases today. They said it should clear up within the next hour or so.
Comment #18
fizk commentedThe infrastructure team has fixed the releases, you should have access to alpha3 now.
Comment #19
stevetheboater commentedCan confirm that alpha 3 is available and fixes the issue. Many thanks :)
Comment #20
pandroid commentedYes, alpha3 seems to have fixed it.
Comment #21
smurfxx commentedWill you update also the dev version? I use that and I still have the bug. Thanks!
Comment #22
fizk commented@smurfxx Thanks, I didn't notice that. I've pinged the infrastructure team.
Comment #23
smurfxx commentedI thank you too @fizk!
Comment #25
pipep commentedHi, this is not fixed at all.
I have a Services View and when adding a Global PHP field, the view doesn't work anymore.
Even after alpha 3 views php broke the view completely.
Removing
from views_php.module fixes the issue, so that it's definitely the problem.
While debugging I found that the process list on the db showed that the view wasn't filtering the number of specified items, and instead it was processing all of them, so it's the same problem still...
Thanks for the fix though !
Cheers.
Comment #26
fizk commented@pipep The committed fix seems to work for others. Can you please create a new issue for the issue you're seeing?
Comment #27
frosty29 commentedI already had used the patch mentioned here from when I came across the problem some time ago. Had the problem again today using latest dev release - this time in a new view of custom entities (rather than nodes) and I had to do as #25 - comment out the clear of range. Can't shed any more light, sorry.
Comment #28
brian16803 commentedLatest dev 2.x has this bug. It didn't become apparent right away though as many things were working fine still with my views elsewhere.
It really messed up my Views Rules. I even tried switching to Views Bulk Operations: Fetch a list of Ids -- as an alternate solution... and the problem still there.
I can confirm this is an issue for the 7.x-2.x-dev - 11/13/15. Was able to fix easily commenting out function views_php_views_post_build (like post #25). Thanks pipep - saved my day!
Comment #29
parasolx commentedI also confirm with the latest release the code comment in #25 is still there. Not sure why the code is there to unlock all the limit query done in first place.
However, removing the line code also didn't solved all problem. When using with pager, it didn't come out as Views PHP already override default range(). Currently I remove all PHP field in Views, and convert back using template override.