I'm using the Rules module to execute custom PHP script whenever a new node is saved after importing via Feeds module.
<?php $lid = db_insert('location')->fields(array( 'additional' => $node->field-address, //saves as '0' 'city' => $node->field-locality, // saves '0' 'province' => $prov, // //saves correctly 'country' => 'xx', //saves 'xx' correctly 'latitude' => $node->field-latitude-temp, //saves as 0.00000 'longitude' => $node->field-longitude-temp, //same 'source' => 1, 'is_primary' => 0 ))->execute();
This is the location table (from the Location module) and I'm importing data from a csv file.
All the other constant values are saved properly except for when it is coming from the $node object. Lat and Lon goes 0.00000 while all the other string values such as city and address also goes 0.
Been dealing with this for hours.
EDIT: I'm using Feeds module. But I need to import also location data. While a row is getting committed to db, the values are all 0!
node:field-latitude-temp shows the actual imported value correctly when viewing the node. But it is not getting absorbed in within the PHP Execute custom code page in Rules.