| Project: | Location |
| Version: | 6.x-3.1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | abbreviation, auto_nodetitle, code, location state province codes kept internal, province |
Issue Summary
I ran into a situation using auto_nodetitle where I needed the node name based off of the state. The maintainer of auto_nodetitle, for reasons stated here: http://drupal.org/node/126996, creates the node title during the form validation. This title is generated before the location module converts the full province name into the code to be stored in the database. Because of this, it attempts to title the node with the entire province name. Hitting edit, the code is in the autocomplete field (gathered from the database) rather than the full name. Submitting again renames the node with the code.
In my situation, I found the best solution was to create an administration setting for the location module that let me choose whether I wanted the autocomplete field to return matches based off the full name or the code.
Although this solution solved my issue in an indirect manner, I felt that this might be useful to other people so I'm including the patch.
| Attachment | Size |
|---|---|
| location_module_autocomplete_settings.patch | 1.07 KB |
| location_admin_inc_autocomplete_settings.patch | 1.04 KB |
Comments
#1
Would this also be the same for D6?
Subscribing,
greetings,
Martijn
#2
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.
There was some work recently on using the full name instead of the code.
#3
Still an issue in D6.
Patches attached.
#4
My previous D6 patch contained a bug. Bug fixed with following attachments.
#5
This is already in dev ;-)
#6
Nice!