- Issue created by @jimconte
Error thrown with a query negation.
Warning: Array to string conversion in Drupal\google_tag\EventSubscriber\SearchApiSubscriber->onSearch() (line 61 of modules/contrib/google_tag/src/EventSubscriber/SearchApiSubscriber.php).
Drupal\google_tag\EventSubscriber\SearchApiSubscriber->onSearch(Object, 'search_api.processing_results', Object)
call_user_func(Array, Object, 'search_api.processing_results', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'search_api.processing_results') (Line: 624)
Query with normal value is handled as a string:
array:2 [▼
"#conjunction" => "AND"
0 => "salt"
]
Negation query flows through as an array
array:2 [▼
"#conjunction" => "AND"
0 => array:3 [▼
"#negation" => true
"#conjunction" => "AND"
0 => "salt"
]
]
1. Install Search API and create server and index
2. Install and configure GTM
3. Run a negation query: example ?query=-salt
Handle negation queries
Active
2.0
Code