Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In a view with a variety of fields, filters, and sorts, a particular contextual filter causes the preview to fail with an AJAX timeout, and the view itself to fail with a WPOD (white page of death). Changing the relationship of the field in the contextual filter (i.e. using different data to filter contextually) makes the problem disappear. The data in the field in question works fine otherwise however.
Would anything else help?
Comment | File | Size | Author |
---|---|---|---|
#2 | views-screenshot-1.png | 11.11 KB | eaglegamma |
Comments
Comment #2
eaglegamma CreditAttribution: eaglegamma as a volunteer commentedComment #3
eaglegamma CreditAttribution: eaglegamma as a volunteer commentedAdded a screenshot showing the AJAX error.
Comment #4
eaglegamma CreditAttribution: eaglegamma as a volunteer commentedAfter repeated failures the AJAX preview worked the last time I did it, although the page itself still did not load. At other times the page loads slowly but the preview doesn't. Maybe some byzantine server issue, although the rest of the site is loading fine...
(Incidentally this comment form is also experiencing lots of failures, is Drupal generally this flaky?)
Comment #5
eaglegamma CreditAttribution: eaglegamma as a volunteer commentedI note that adding each contextual filter rapidly increases the query execute time, from less than a second with one contextual filter, to more than a second with two contextual filters, to thirteen seconds with three contextual filters. Why does this grow so fast?
Comment #6
eaglegamma CreditAttribution: eaglegamma as a volunteer commentedAs far as the contextual filters themselves, it seems to affect some more than others. A particularly notable example of this is that "exclude" filters that limit instead of expanding the results don't have much impact on the speed, whereas almost any combination of three "include" filters slows the view down to the point of failure, and one or two of my relationships in particular cause a lot of slowness.
Comment #7
renatogHello Eagle how are you? I was testing here with many views with contextual filters and it worked for me.
This comment on #4 can be explained in that case. On #5
I realized that as well, is true, but in my case, it worked as well using two different web servers Acquia and Platform.sh (lando locally). I saw that on releases page we were using 7.x-3.18 or oldest. So I think the main recommendation on that case is to update for the last stable version of views, run all updates on /update.php and clear all caches. Another recommendation is to disable Drupal Aggregation for JS in Development settings just to test and enable again. These steps will work for you. It worked for me. Even so, if you have any other issues or questions related to this feel free to reopen ok? Thank you so much, Eagle