If a user only gives a country (and its all you require), and that country is the same as the default, it will match against location_empty_location() and so never be saved.

Comments

yesct’s picture

Issue tags: +location defaults

Is this still a problem in the newest dev version?

juicytoo’s picture

Hi,.

using

location-6.x-3.1-rc1.tar.gz

The save default country does not appear.

It default to America in "create Content" in CCK.

cheers
Ed

yesct’s picture

Ed, try the new .dev version.

bdragon’s picture

That's a good point. I probabaly need to be checking whether the location itself is required before discarding such a location as empty.

johnedm’s picture

i did a bit of diggin... it is because, for some reason, the $items array in the update of location_cck_field has nothing in it when saved w/o the user changing anything but the lat/lng. not sure why that is, but seems to be fixed in the .dev version.

frankcarey’s picture

yesct’s picture

Status: Active » Postponed (maintainer needs more info)

Please check to see if this is still a problem in the new release. If it is, reply with a new summary and set the status back to active.

shaneonabike’s picture

I snagged the latest release and it still seems to be an issue. If the default value is set to Canada in the Location CCK it doesn't seem to save an country. If I change it to another country, save it, and then save it back to Canada then it saves.

igor.ro’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)