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).

CommentFileSizeAuthor
#10 2684881-Unkown_data_property.patch693 bytesMaskOta
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Yoran Scholiers created an issue. See original summary.

jackalope’s picture

Priority: Normal » Major

Same 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.

George Rahman’s picture

I'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 to entity_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.

Pol’s picture

Hi,

Have you tried with the dev version ?

Thx

George Rahman’s picture

I 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.

opdavies’s picture

I'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.

opdavies’s picture

I've run a git bisect between 7.x-1.2 and 7.x-1.3, and identified which commit introduced this error:

Bisecting: 0 revisions left to test after this (roughly 0 steps)
[59548f1d3a843bbbdb90ba0b3155d692ee1cd05b] Issue #2159925 by rudiedirkx, hussainweb: Geocode from virtual fields/entity property instead of just real fields

opdavies’s picture

In my instance, the $entity passed into the entity_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.

lamp5’s picture

Confirm. The same problem with 7.x-1.3

MaskOta’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
Status: Active » Needs review
FileSize
693 bytes

I found this still being a problem in the dev version.
Only tested with the location field and the attached patch fixed this for me.

steffl’s picture

Had same issue, patch from #10 worked for me. Thank you!

  • Pol committed 3f7813b on 7.x-1.x authored by MaskOta
    Issue #2684881 by MaskOta: EntityMetadataWrapperException with location...
Pol’s picture

Status: Needs review » Fixed

Thanks, it's fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.