We have ~1200 news articles, and it seems to cause some error when the View filter allows all the 1000+ articles.
I'm sorry this is going to be a crappy bug, but I can't figure out were the code is erroring. It must be some kind of out-of-memory error, because nothing is appearing in the logs?
It only seems to happen when placing the pager block on the article pages. The pager renders in the "Edit View" preview area just fine (it says "1 of 1270", etc). But when I place the block on the article page, I get a "white page of death".
I am not able to get any errors or stack traces, in any of the logs (either output to the screen or in apache, php-fpm, the Drupal DB log, etc, with all error reporting turned on...). (No "performance suggestions" appear, either).
I have even stepped through the extension code, and commented out parts (like the counter), and it doesn't seem like any code in this module itself is erroring. I can't figure it out.
If I set the pager to LIMIT 10 (ish), or add filters to reduce the number of items, the pager renders as expected.
Sorry for the poor bug, but I thought I would file it in case anyone can track down what loop or something is choking on 1000+ items. Thanks.
Comment | File | Size | Author |
---|---|---|---|
#8 | entity_pager-2889730-08.patch | 5.49 KB | adel-by |
#7 | entity_pager-2889730-07.patch | 4.01 KB | mvbaalen |
#4 | entity_pager-2889730-prelim2.patch | 4.4 KB | woutgg |
Comments
Comment #2
bmcclure CreditAttribution: bmcclure as a volunteer and at Top Floor commentedThanks a lot for the report!
Added related issue that provides a little bit of additional troubleshooting detail.
Will get to this ASAP unless anyone else finds a good solution in the meantime.
Comment #3
workplaysleep CreditAttribution: workplaysleep commentedI can confirm on this bug, for a collection of 2000 nodes I'll get the WSOD. When I limit the number of items to 500 the pager displays. With larger numbers i get the WSOD.
Comment #4
woutgg CreditAttribution: woutgg commentedPlease see the attached patch which should be a preliminary fix for this issue.
The problem causing the wsod error is that *all* result rows are rendered even though they are never used.
To counteract this, it implements a custom view pager which uses the preRender() hook to drop all results except the previous-next-context around the current item as well as the very first and last items to support circular paging.
It still has some issues, mainly that it will probably not work correctly with relationship entities anymore (see patch).
I know the patch is not a complete fix but I'm sharing it anyway in case it can help someone else to come up with a complete fix.
Comment #5
bmcclure CreditAttribution: bmcclure as a volunteer and at Top Floor commentedThanks very much for this initial patch!
I think it's a great step in the right direction, and even with the possible relationship-related issue might be enough to fix the problem for many people with simple use cases. I will spend some time with the patch ASAP and determine if it makes sense to commit or to perhaps use it as the basis for a larger overall fix.
Either way, I really appreciate the contribution, and you'll definitely be getting credit for this issue when it's resolved!
Comment #6
woutgg CreditAttribution: woutgg commentedGlad to be of help!
In case my comments in the patch are unclear, just let me know.
I would like to mention that @workplaysleep provided the opportunity for me to invest time in this, so credits to him for that (even if informally).
One other thing I think should be considered is how things work wrt to configuring the view pager in the admin interface. Since it doesn't make sense to use the module-specific view pager with other types of view styles it should not be visible if the entity pager is not active as view style.
Concurrently, if the entity pager is active, the view pager should probably be locked to its own internal one.
I do not know how to define such restrictions though, if at all possible.
Comment #7
mvbaalen CreditAttribution: mvbaalen at Buro Meta commentedre-rolling patch for the RC1 version.
Comment #8
adel-by CreditAttribution: adel-by commentedRe-rolling patch for the 2.x version
This patch includes work from #3076457 to enable search_api views compatibility.
Tested on a search_api_solr views with 6500+ records and it works just fine.
However this is still a "preliminary fix" as the comments of @woutgg are still relevant.
Comment #9
sp3boy CreditAttribution: sp3boy at Travelopia commentedI am adopting the patch from #8 as a much-needed solution for the rendering limit and general performance issues. I agree with the suggested refinements but for now this makes it possible for me to provide the site functionality.
Edit: "Thank you!"