The latest commits have broken geo_field cck fields; data is not loaded into the node edit form correctly, and when new data is entered NULL is saved in its place.
** Data isn't loaded into the node edit form correctly because the geo_field_WIDGET_process() functions are looking for lat, lon, and wkt values in the $element array; these values are no longer present (maybe because they have to be specifically requested by declaring 'gis type' and 'gis input'?)
** Data isn't saved correctly because the wrong variable is checked for emptiness during save:
diff -r 8ba88d1640d6 modules/geo_field/geo_field.module
--- a/modules/geo_field/geo_field.module Thu Jun 11 12:31:52 2009 -0500
+++ b/modules/geo_field/geo_field.module Fri Jun 12 09:15:58 2009 -0500
@@ -183,7 +183,7 @@
// Convert the wkt to binary data before the insert. This allows the
// input to pass through the binary query substitutions.
- if(!geo_content_is_empty($item, $field)) {
+ if(!geo_content_is_empty($items[$k], $field)) {
$items[$k]['geo'] = db_result(db_query("SELECT GeomFromText('%s', 4326)", $items[$k]['wkt']));
}
}
Comments
Comment #1
swill commentedsubscribing so it shows in my issues...
Comment #2
quickcel commentedI'm having the same problem - every time I try to enter in data for the lat/long fields nothing gets stored in the database
Comment #3
swill commentedThis fix no longer seems to work...
Comment #4
becw commentedThat specific bit of code has been fixed; however the issue itself still exists.
Comment #5
swill commentedThe info is now storing again (with the newest dev version of Geo).
Comment #6
ebranda commentedI'm still having the same problem (reported by quickcel) with the latest dev version (June 26, 2009 - 12:17). Also, I'm using MySQL, and querying the value in the GEOMETRY column that is created by the Geo Field module returns NULL.
Comment #7
gagarine commentedSame problem.
Comment #8
allie mickaI'm fairly certain this is all working now. If not, please provide some specifics on how you've created the field and how it's behaving. Thanks!
Comment #9
gagarine commentedOk, if i use long/lat widget include in geo that's seem to work. But with geocode nothing is stored. Certainly it's only a geocode bug so I don't reopen this issue...
The bug in geocode project #486010: PHP error in geocode_widget.module.
Comment #11
EDDYL commentedRe-opening the issue.
on the 14th august 2010 there is still a problem when saving data (NULL is stored in DB).
Comment #12
EDDYL commentedI have the same problem with alpha5 version.
I tried to install dev version but cannot do anything : Fatal error call to undefined function geo_load()...
Comment #13
adamus_maximus commentedmore info, may be helpful to those trying to replicate bug:
I experience this problem intermittantly on my site, and I think I've found what conditions cause the bug.
On my site, I have a node type that contains an address field, a geo field that gets calculated from that address field, and a bunch of other fields. When a user registers on our site, they are required to fill in certain fields of this content type. If they fill out the fields correctly, all works fine, and the geo is populated. If validation fails (because they didn't fill in a required field, or entered an invalid value somewhere) then drupal informs the user, the user fixes the problem, and is able to submit. But in this case, the geofield contains "NULL".
hope it helps.
Comment #14
adamus_maximus commentedFixed! (sort of)
My issue is probably not the same issue as the original poster was experiencing.
My previous comment about it being about the validation failing was incorrect.
To repeat this bug:
- install and enable the content profile user registration module
- add an address field to a content profile node. (or any other compatable field should probably work too)
- add a geo field, geocoded value from another field, select that address field. I use the geocode google handler.
- on the "content profile" tab, select "Use on Registration"
- Logout of the site.
- Create a new account.
- the user registration module should present that address field for you to fill in. Fill it in and hit submit (or whatever the button says)
The address field will be populated, but the geo field will still be NULL.
In my opinion, this is a bug in the content profile -> user registation submodule.
Check out my post and patch regarding that:
http://drupal.org/node/826126#comment-3553282
However, that patch may have side effects.
The lowest-impact patch is a minor change to geo:
Comment #15
adamus_maximus commentedwhoops, I got that patch backwards.
This is what I meant:
Comment #16
avpadernoI am closing this issue, since Drupal 6 releases aren't supported anymore.