On preview of entity, I have the following error :

Warning : fwrite() expects parameter 2 to be string, array given in geoPHP::detectFormat() (line 213 in sites/all/modules/contrib/geophp/geoPHP/geoPHP.inc).
Notice : Undefined index:  in geoPHP::load() (line 62 in sites/all/modules/contrib/geophp/geoPHP/geoPHP.inc).
Exception : geoPHP could not find an adapter of type  in geoPHP::load() (line 65 in sites/all/modules/contrib/geophp/geoPHP/geoPHP.inc).

It happens also when using the geofield with Latitude/Longitude widget in an entity (created with eck) and using IEF to manage these entities in nodes, and when I want to save the referenced entity (on node form page), I have the same error in Ajax.

It seems that IEF does not invoke hook_field_presave().

Comments

SylvainM created an issue. See original summary.

sylvainm’s picture

Title: Error when saving entity in an Inline Entity Form (IEF) » Error when previewing entity or saving entity in an Inline Entity Form (IEF)
Issue summary: View changes
sylvainm’s picture

Status: Active » Needs review
StatusFileSize
new742 bytes

Attached patch solves that

sylvainm’s picture

It seems to be fixed in dev version: https://www.drupal.org/node/2515656#comment-10924233

ollie222’s picture

After my comments in the other thread where I thought everything was working I believe the patch in #7 is still needed but it needs a slight alteration.

The variable $item['input_format'] doesn't exist if you edit the node directly and not via IEF so the patch throws an error.

Changing

          if (false) {//$item['input_format'] == GEOFIELD_INPUT_LAT_LON) {

to

          if ((!empty($item['input_format'])) && ($item['input_format'] == GEOFIELD_INPUT_LAT_LON)) {

seems to fix the problem and currently I don't think I have any errors or warnings appearing when editing the node directly or via IEF.

jcisio’s picture

Status: Needs review » Closed (outdated)

Fixed and rewritten in the latest stable.