I want to copy a geofield to another geofield in the same content type.
- I created a Rule where I "Set Data Value" and with that I copy the data of one geofield into the other. Actually I created two actions one for longitude and latitude.
- This action is triggered when "After updating existing content".
- I used VBO to parse through my nodes therefore the trigger to be fired and geofield data to be copied.
Nothing happens. I get two errors in error log saying:
Unable to evaluate action data_set.
Unable to modify data "node:field-business-location...
I tried to expose the fields to rules by "Entity has field" condition but doesn't work either.
What am I doing wrong.
PS: There is also an option of "Create Geofield values from Lat/Lon but I don't see how I can copy data from one Geofield to another Geofield like this.
My Rule Export
{ "rules_copy_geolocation_data" : {
"LABEL" : "Copy geolocation data - Destinations", "PLUGIN" : "reaction rule", "OWNER" : "rules", "REQUIRES" : [ "rules" ], "ON" : { "node_update--destination" : { "bundle" : "destination" } }, "IF" : [ { "entity_is_of_bundle" : { "entity" : [ "node" ], "type" : "node", "bundle" : { "value" : { "destination" : "destination" } } } }, { "entity_has_field" : { "entity" : [ "node" ], "field" : "field_destination_location" } }, { "entity_has_field" : { "entity" : [ "node" ], "field" : "field_business_location" } } ], "DO" : [ { "data_set" : { "data" : [ "node:field-business-location:lat" ], "value" : [ "node:field-destination-location:lat" ] } }, { "data_set" : { "data" : [ "node:field-business-location:lon" ], "value" : [ "node:field-destination-location:lon" ] } } ] } }