Closed (fixed)
Project:
Geo
Component:
Geo Field module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Mar 2009 at 03:17 UTC
Updated:
24 Jun 2009 at 17:40 UTC
Geo_field doesn't seem to offer a way to adjust multiple values settings. There are always two geo fields in the form.
Comments
Comment #1
allie mickaThis is partially a bug and partially by design.
By Default, CCK tries to append a field's columns to a content type's table if it is a single-value field. If you make the field a multiple value field, or if you add that field to a new content type, the columns are dropped and re-added to a per-field table.
The trouble is, CCK and the Schema API are unable to deal with the geospatial fields that Geo has, so the multiple field value is always set to "True" in order to prevent this sort of moving around. I don't think there's a way around that.
However, there's certainly got to be a means of setting an alternative "muliple value" field that functions the same way from the user's perspective.
Comment #2
dodorama commentedSo which is exactly the problem with having the field on the content type's table? Is it correct that all we need is a way to force the creation of a field-table without having to set multiple field value to TRUE?
Comment #3
allie micka"So which is exactly the problem with having the field on the content type's table?"
Theoretically, there's no problem with having the field on the content type's table. But there IS a problem with allowing CCK to move it to another table for any reason. CCK would drop the geo_field's columns, re-add its non-geo fields to a new table, and then your data would be lost.
As a fail-safe, I am also storing the geo data in text form. But you wouldn't want to rely on that.
"Is it correct that all we need is a way to force the creation of a field-table without having to set multiple field value to TRUE?"
Basically, yeah. In short, we need to prevent CCK from trying to move the table once it has been created and initialized.
Comment #4
mackh commentedIt would be much better to be able to only have the user input a single value, i'm playing with having the user choose location using gmap. The geo_field is showing 2 gmaps, the first renders, the second (for the second lat long) fails to render the map but is still requiring lat long. I can copy and paste the lat long from the first field to the second, but then the node gets the same Point added to it twice.
Any ideas on where I can hack around this, considering that the cck field is already established and not going to change in my build? Schema API wha?
Thanks!
-Mack
Comment #5
josuealcalde commentedThis bug makes geo not usable because having a multivalue when only one value is needed can confuse users.
What about filling a bug in cck to try to correct this problem.
Comment #6
allie mickaI have identified a workaround, which is described in my recent commit: http://drupal.org/cvs?commit=223658
Thus I'm marking this fixed :) yay!
You should now be able to have single/multiple values, share a field across content types, and do anything else you'd expect from CCK field to do for you.
If any unexpected behavior occurs, please open a new ticket accordingly.
Thanks!