• City Autocomplete is a simple Form API autocomplete textfield with Google Places API integration.
  • By typing the city name you can get a list of Cities + Countries found. On form submission the list turns into structured array of detailed values of the City selected.
  • Similar functionality can be found in Location module, but the key difference is City Autocomplete module uses Google Places API to search for cities and countries. Thus the information returned is always the most current. There is NOT used a list of cities all around the world.
  • This is my first project to be reviewed from Sandbox mode.
  • See more info on the Sandbox Project Page:
    https://drupal.org/sandbox/wzoom/2109111
  • Git Clone command:
    git clone --branch 7.x-1.x git.drupal.org:sandbox/wzoom/2109111.git city_autocomplete
CommentFileSizeAuthor
city-autocomplete.png14.55 KBwzoom

Comments

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxwzoom2109111git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

Anonymous’s picture

Status: Needs work » Reviewed & tested by the community
saitanay’s picture

Status: Reviewed & tested by the community » Needs review

Hi wzoom,

Here are a couple of my observations.

Coding Standards

As for the module code, running it through coder module, shows some markup issues.
List @ http://pastebin.com/qF4Bz7Tf

You could also run the code through http://pareview.sh/ . It is a great tool.

Commented code:

There is a good amount of code which is commented out and not used - city_autocomplete_theme(),theme_city_autocomplete(), and many dsm()/dpm(). Should be good to have those removed to keep it cleaner.

Not Working

The autocomplete field is not working inspite of having a valid API key with Google Maps API v3 service enabled with my IP whitelisted.
The ajax xmlhttprequest always seems to return a blank array.
Here are the header request on my browser if that should help you debug.
http://pastebin.com/GYPZeUH1

Form Validations

Mark the API Key field as mandatory on the settings page.

Catch 22 situation

Here is a scenario in which the user gets into trouble and may not be able to figure out what he can do.
* User entered a wrong API key and saved it
* He decides to fix it by going to the config page again, which is now showing not just the API key field, but also a demo field to showcase the autocomplete (which does not work now because the user has entered a wrong key in earlier step)
* Now he enters the correct key and tries to save the form. The city field throws an error "City is not correct" when left blank.
* To somehow get the new API key saved user enters a random city name and tries to save the config page. Again "City is not correct" throws up because of some validation (since the field is not working currently due to incorrect api key)
As such, user has no way to correct the API key. (Probably he could uninstall the module and install all over again)

Thank you
Tanay

minoroffense’s picture

Status: Needs review » Needs work

Should actually be set to needs work

PA robot’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application (see also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.