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.
It seems that geocoder is no longer working with the Location module when geocoding from that field since the update to 1.3.
The problem occurs on line 232 from geocoder.widget.inc.
EntityMetadataWrapperException: Unknown data property field_event_location. in EntityStructureWrapper->getPropertyInfo() (line 335 of <snip>/sites/all/modules/contrib/entity/includes/entity.wrapper.inc).
Comment | File | Size | Author |
---|---|---|---|
#10 | 2684881-Unkown_data_property.patch | 693 bytes | MaskOta |
Comments
Comment #2
jackalope CreditAttribution: jackalope commentedSame here; reverting to geocoder-7.x-1.2 fixes the problem. With 7.x-1.3 installed I can no longer save nodes that include Location fields.
Comment #3
George Rahman CreditAttribution: George Rahman as a volunteer commentedI've experienced this error as well. I tracked it down to where I think the error is occurring. In
geocoder_widget_get_entity_field_value
, there's a call toentity_metadata_wrapper
that returns a wrapper object. The code expects that object to have a property matching the location field's name (e.g.field_location
), but it has no such field (around line 231 of geocoder.widget.inc).The line is:
$field_wrapper = $wrapper->$field_name;
I'm not sure what the fix is off-hand and don't have time to troubleshoot further. Now that I know I can turn revert to an older version, I will pursue this option.
Comment #4
PolHi,
Have you tried with the dev version ?
Thx
Comment #5
George Rahman CreditAttribution: George Rahman as a volunteer commentedI have not tried the dev version and, unfortunately, don't have the time to give it a try at the moment. I was using the latest stable release when I saw the error. Using 7.x-1.2 fixed the problem.
Comment #6
opdaviesI'm having the same issue with 7.x-1.3, and confirm that I'm still having the issue with the latest 7.x-1.x dev version.
Reverting to 7.x-1.2 also works.
Comment #7
opdaviesI've run a
git bisect
between 7.x-1.2 and 7.x-1.3, and identified which commit introduced this error:Comment #8
opdaviesIn my instance, the
$entity
passed into theentity_metadata_wrapper()
function at http://cgit.drupalcode.org/geocoder/tree/geocoder.widget.inc?h=7.x-1.x&i... contains my field_event_location field, but the resulting wrapper does not which is causing the Exception to be thrown.I don't currently know why this would be the case though.
Comment #9
lamp5Confirm. The same problem with 7.x-1.3
Comment #10
MaskOta CreditAttribution: MaskOta commentedI found this still being a problem in the dev version.
Only tested with the location field and the attached patch fixed this for me.
Comment #11
steffl CreditAttribution: steffl commentedHad same issue, patch from #10 worked for me. Thank you!
Comment #13
PolThanks, it's fixed.