Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Using the apacheolr_views_query plugin causes the following notices to show when grouping_info is an empty array.
Notice: Undefined index: group in apachesolr_views_query->build() (line 123 of /apachesolr_views_query.inc).
Notice: Undefined index: group in apachesolr_views_query->execute() (line 186 of /apachesolr_views/apachesolr_views_query.inc).
The attached patch introduces an isset test to avoid this.
Comment | File | Size | Author |
---|---|---|---|
remove-undefined-index-notices-from-query-handler.patch | 1.01 KB | daniel.rolls@flightcentre.com.au | |
Comments
Comment #1
daniel.rolls@flightcentre.com.au CreditAttribution: daniel.rolls@flightcentre.com.au commentedChanged status to needs review.
Comment #2
DeFr CreditAttribution: DeFr commentedRunning the latest beta, I have a notice related to grouping too. (Notice : Undefined property: apachesolr_views_query::$group_operator dans apachesolr_views_query->build() (line 80 of sites/all/modules/contrib/apachesolr_views/apachesolr_views_query.inc).
Not sure against which version the patch was made, but it doesn't apply and the patch context doesn't match anything that's actually in http://drupalcode.org/project/apachesolr_views.git/blob/c2b0ab5b9e290aa7... . Do you have other patches already applied ?
Comment #2.0
DeFr CreditAttribution: DeFr commentedFixing my grammar.
Comment #3
MiroslavBanov CreditAttribution: MiroslavBanov commentedProblem in issue summary is non-reproducible, and the patch doesn't apply - the lines that are supposed to be fixed don't exist in current dev, or beta3.
The problems in comments #2, #2.0 duplicate and are fixed in #1761432: Undefined property: apachesolr_views_query::$group_operator line 83 apachesolr_views_query.inc.