In Glossary addFieldValues, when an item doesn't have any values for a glossary enabled field, a whole host of PHP notices and warnings appear (see below). Checking for values seems to resolve this issue.
Notice: Undefined offset: 0 in Drupal\search_api_glossary\Plugin\search_api\processor\Glossary->addFieldValues() (line 103 of modules/contrib/search_api_glossary/src/Plugin/search_api/processor/Glossary.php).
Deprecated function: Non-static method Drupal\search_api_glossary\GlossaryHelper::glossaryGetter() should not be called statically, assuming $this from incompatible context in Drupal\search_api_glossary\Plugin\search_api\processor\Glossary->addFieldValues() (line 109 of modules/contrib/search_api_glossary/src/Plugin/search_api/processor/Glossary.php).
Notice: Undefined index: grouping in Drupal\search_api_glossary\Plugin\search_api\processor\Glossary->addFieldValues() (line 109 of modules/contrib/search_api_glossary/src/Plugin/search_api/processor/Glossary.php).
Warning: array_values() expects parameter 1 to be array, null given in Drupal\search_api_glossary\GlossaryHelper->glossaryGetter() (line 17 of modules/contrib/search_api_glossary/src/GlossaryHelper.php).
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2885556-search_api_glossary-glossary_field_empty-2.patch | 971 bytes | blake.thompson |
Comments
Comment #2
blake.thompson commentedPatch to check if field values are empty
Comment #3
blake.thompson commentedComment #4
blake.thompson commentedComment #6
dakku commentedThank you Blake, this is now committed.
Comment #7
dakku commented