Closed (fixed)
Project:
Geolocation Field
Version:
7.x-1.x-dev
Component:
Geolocation field
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Dec 2012 at 23:03 UTC
Updated:
12 Aug 2013 at 08:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
derjochenmeyer commentedThanks. This patch belongs here :)
One comment: Lets use what Geofield uses.
Any help to turn this into a real patch is appreciated :)
Comment #2
rdeboerAll you have to do is append this to the geolocation.install....
Comment #3
ybyte commentedthe real patch :)
Comment #4
derjochenmeyer commentedWe need some testing here. When testing the patch you should compare the database schema (especially of all geolocation fields) and the values for lat_sin, lat_cos, lng_rad before and after running update.php.
The patch above takes care of all existing fields. What about new fields added via the UI? The patch does not alter the schema itself but only existing fields, right? Do we need to change the schema as well? Guess so...
Comment #5
rdeboerI did some testing when I completed the patch.
I checked in phpMyAdmin whether after running update.php:
1) the data type had changed from float to double
2) the number of decimals of data in the three columns changed from 6 or 7 to 13 or 14.
As I mentioned at the top:
"Note: the only thing missing from the patch is to add 'size' => 'big' to the last 3 float columns in function
geolocation_field_schema($field)so that all 5 columns store doubles, rather than just the lat/lng columns."Comment #6
rdeboerOk here's a proper patch that includes everything mentioned above. All 5 columns consistent double precision.
Also got rid of the constants used for the table names, using core functions to get these names instead. Just a bit neater.
Comment #7
derjochenmeyer commentedPatch looks good. Thanks, committed!
Comment #8
derjochenmeyer commentedPatch fails: http://drupal.org/node/1867686
Comment #9
derjochenmeyer commentedComment #10
derjochenmeyer commentedThis definitely needs work.
Comment #11
derjochenmeyer commentedThanks for jjchinquist who pointed me into the right direction with
$table = $table_prefix . $field_name;#2048213: during update i receive the foll database error
Here is a patch, which I tested:
This patch is should be in the latest 7.x-1.x-dev in a couple of minutes ... please test and review ...
Comment #12
derjochenmeyer commentedComment #13
jjchinquistThe update.php ran both
70017101 and70027102 without error. I was able to create and update a node on a mirrored test site of a production server - no issues. I think it is ok.Comment #14
derjochenmeyer commentedThanks for testing this. I think this should be ready for 7.x-1.4