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.
After adding a proximity field to a view with a Geolocation Google Maps API - CommonMap formatter and adding a proximity sort criteria with an exposed geolocation form, the following PHP notice is shown on the resulting view page:
Notice: Undefined index: #weight in Drupal\geolocation\Plugin\views\field\ProximityField->viewsForm() (line 540 of modules/contrib/geolocation/src/Plugin/views/field/ProximityField.php).
This is caused by a faulty if
condition in ProximityField
.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2862522-2.patch | 660 bytes | dietr_ch |
Comments
Comment #2
dietr_ch CreditAttribution: dietr_ch at EntityOne commentedAttached a patch that replaces
empty()
withisset()
to check whether the weight is present on the form field.Comment #3
dietr_ch CreditAttribution: dietr_ch at EntityOne commentedComment #5
ChristianAdamski CreditAttribution: ChristianAdamski as a volunteer commentedThanks
Comment #7
lindaweb CreditAttribution: lindaweb commentedPatch Failed : #1 FAILED at 536
should be