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 apachesolr_views_query->execute() the result from apachesolr_do_query() is not tested which causes a warning and four notices.
When a solr query is aborted in e.g. apachesolr_access_build_subquery because of an access check it throws an exception.
apachesolr_access_apachesolr_query_alter catches that error, saves a watchdog messages and sets
$query->abort_search = TRUE
resulting in the later return of NULL by apachesolr_do_query().
We then get:
Warning: array_values() expects parameter 1 to be array, null given in view->execute() (regel 1163 van ..../profiles/commons/modules/contrib/views/includes/view.inc).
And twice these two:
Notice: Trying to get property of non-object in apachesolr_views_query->execute() (regel 156 van ...../sites/all/modules/apachesolr_views/apachesolr_views_query.inc).
Notice: Trying to get property of non-object in apachesolr_views_query->execute() (regel 150 van ...../sites/all/modules/apachesolr_views/apachesolr_views_query.inc).
Comment | File | Size | Author |
---|---|---|---|
#3 | handle_aborted_query-2382091-3.patch | 807 bytes | helmo |
#1 | handle_aborted_query-2382091-1.patch | 965 bytes | helmo |
Comments
Comment #1
helmo CreditAttribution: helmo commentedHere's a mockup patch that checks this. (just as a proof of concept)
Comment #3
helmo CreditAttribution: helmo commentedApparently it was too late for a correct patch :) ... here's a better one.
Comment #4
helmo CreditAttribution: helmo commentedComment #5
MiroslavBanov CreditAttribution: MiroslavBanov commentedOops, I guess I missed this issue. There is already a duplicate now: #2458411: Permission: View published content set to only authenticated user and administrator.
Comment #7
MiroslavBanov CreditAttribution: MiroslavBanov commented