Closed (fixed)
Project:
Geofield
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Apr 2013 at 15:49 UTC
Updated:
27 May 2023 at 14:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dasjoComment #2
reysharks commentedWorks for me :)
Comment #3
geek-merlin@dasjo: i like your patches!
worksforme, and is very useful
So setting rtbc.
Comment #4
Brandonian commentedThanks for the patch, @dasjo! Committed to 7.x-2.x
http://drupalcode.org/project/geofield.git/commit/22f0462
Comment #6
Brandonian commentedMarking as fixed.
Comment #8
Tranko commentedHello!
I found a problem with rules componentes, geoPHP is not initialized when a rule component want create a geofield value to assing a node.
I add geoPHP::load(); before the class Point and its works fine!
Regards,
Tranko.
Comment #9
pio.fernandes commented#8 was totally on it. I had to add "geophp_load();" inside geofield_rules_create_values function in geofield.rules.inc
Hope it helps somebody.
Comment #10
marc.groth commentedI had the same problem as #8 and #9, so I'm sure this is not just an edge case.
I have attached a patch that fixes the issue. Could this be reviewed and then included in the next release please?
Comment #11
geek-merlinAh this makes sense code-wise.
Comment #12
geek-merlinThe patch aplies well and makes sense codewise.
Note: to apply the patch, use something like this:
patch -p7 <../geofield-rules-1976732-10_0.patch@marc.groth:
the standard is to base pytches on the module dir (and apply them with -p1), not the drupal base dir.
Comment #13
steveoriol#10 works to me, cool :-)
Comment #14
fubarhouse commentedAny chance of getting this released, I would *really* like to fix a very old problem on one of our sites...
Comment #15
coreteamvn commentedFor those who are not so familiar with patching, just add geophp_load(); to the function below in sites/all/modules/geofield/geofield.rules.inc
/**
* Rules action for creating geofield values from lat/lon.
*/
function geofield_rules_create_values($lat, $lon) {
geophp_load();
$geometry = new Point($lon, $lat);
$value = geofield_get_values_from_geometry($geometry);
return array(
'geofield' => $value
);
}
Comment #16
sano commentedThis works for me as well. Thanks.
It's 1919, the patch has been marked as rtbc almost 3 years ago... How can I help to have this committed?
(I lost couple of hours dealing with this problem)
Comment #18
poker10 commentedThanks all! Fixed the missing geoPHP inicialization.