Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The state dropdown doesn't hold it's value when you preview or go back to re-edit a node.
Comment | File | Size | Author |
---|---|---|---|
#11 | location-province-19465.patch | 1018 bytes | smk-ka |
#10 | location-province-19465.patch | 811 bytes | smk-ka |
Comments
Comment #1
ankur CreditAttribution: ankur commentedComment #2
ankur CreditAttribution: ankur commentedFixed it with a patch: http://cvs.drupal.org/viewcvs/drupal/contributions/modules/location/loca...
In the future: Maybe I should upload the patch here first and then commit.
-Ankur
Comment #3
joshk CreditAttribution: joshk commentedNot fixed completely. The error still occurs if an admin has set up a content-type which allows state/province, but does not allow for country. This is because with the following login in location_api2form, if the country is not set, the province field will remain unset in $translated:
A lot of other functionality seems to be missing when the country field is disabled as well (e.g. map links). Maybe it should not be optional?
Comment #4
ankur CreditAttribution: ankur commentedFixed for real this time! (by the [gasp] multi-taskin patch at http://drupal.org/node/19604 )
I'm trying to get the module to detect when a person has selected a state from the province drop down but not the appropriate country.
The "value" attribute for the province HTML select options go by us-CA for California, us-WA for Washington state and so on. The idea is that someone can later write a JavaScript that narrows down the province selection to the appropriate states when a country is selected. However, currently, if someone selects a state but forgets to select a country, why not complete the task for them?
-Ankur
Comment #5
(not verified) CreditAttribution: commentedComment #6
seutje CreditAttribution: seutje commentedThink I just hit the same problem, not using CCK, just 6.x-3.x-dev Location. Default country is set to "Belgium" and is omitted from the node/add form, default state/province is set to "Antwerpen", but isn't omitted from the node/add form, now when I first submit a node, it'll do things as expected, but when I edit the node, the state/province field will say "VAN"
this does not happen when previewing, only when editing
Comment #7
YesCT CreditAttribution: YesCT commentedseutje, please look through the issue queue for other issues involving "defaults" and see if any of them might be related to what you are seeing...
Comment #8
DamienMcKennaAm seeing this myself in v6.x-3.1.
Comment #9
casmbu CreditAttribution: casmbu commentedI am seeing this issue in the v6.x-3.x-dev.
Comment #10
smk-ka CreditAttribution: smk-ka commentedWith the province display option set to "Display full province name" and no default value for province specified, the hack as in the attached patch was required to make the province value stick during node preview. Depending on your specific settings for the province field it may or may not work, hence "needs work".
Comment #11
smk-ka CreditAttribution: smk-ka commentedRevised patch which acts on whether a node preview is in progress or not.
Comment #12
casmbu CreditAttribution: casmbu commented#10 worked #11 did not
Comment #13
podarokbot recall
Comment #14
podarokbot
Comment #16
legolasboClosing old D6 issues as D6 is end of life