- π§πͺBelgium borisson_ Mechelen, π§πͺ
This looks great, I'm not sure how viable it is to add integration tests for this and a unit test doesn't add much value, because it's only the integration with search api that matters.
RTBC based on that.
- last update
over 1 year ago 32 pass - πΊπΈUnited States recrit
After applying patch address-integrate_address_searchapi-2812659-74.patch, I started to notice the logs being littered with the following warning:
Warning: Undefined array key "value" in Drupal\address\Plugin\search_api\processor\AddressAbbreviationsToFullForm->triangulateCodeToFulltext() (line 198...
Cause:
This is caused by the new code in patch 74 to account for the country field:$current = $result = $field_value[$target] ?? $field_value['value'];
An address field can have optional properties so
$field_value[$target]
may actually be NULL for an address field (not a country field).Fix:
The attached patch changes the line to the following to account for NULL values.$current = $result = $field_value[$target] ?? ($field_value['value'] ?? NULL); if (!isset($result)) { return $result; }
The patch also updates the "preprocessIndexField" method to account for NULL to avoid string operations on a NULL value which causes deprecation notices in PHP 8.1
- π·πΈSerbia bojanz
Changing version to 2.x-dev, this will have to go into the 2.1.0 release, 8.x-1.x is now closed.