Migrate City - Zip Code Service Areas: Install New Updates
Link: https://support.brilliantdirectories.com/support/solutions/articles/12000109028
The Install New Updates module on the admin dashboard lists one-time platform installers that have pending steps for your specific website. Click the green Check For Updates button to refresh the list — an installer only appears when your site actually has something left to install, and it disappears from the list once its steps are complete.
What Migrate City - Zip Code Service Areas Does
This installer fills in missing city and zip code values on the service areas your members have saved. A service area is a location a member selects in their account to show where they work, either a city or a zip code. Older records stored each area's map coordinates but not its city name or zip code as text. This update looks each incomplete area up with Google's Geocoding service and writes the missing value onto the record.
Specifically, when you run the step it:
- Finds every record in the service_areas table where a City-type area has an empty city value or a Zip-type area has an empty zip code value.
- Groups those records by place, so each unique location is looked up only once even when many members selected the same area.
- Sends each place to Google's Geocoding API (using its Google place ID where available, falling back to its address or its coordinates) and reads the city name and postal code from the result.
- Saves the values back to the database through the Bootstrap Theme - Account - Select Locations widget, updating every member record that shares that place.
One cleanup action happens automatically during the status check itself, before you click anything: the installer deletes service-area rows that have both an empty place ID and an empty address. Those rows carry no location information at all. With no place ID and no address, nothing identifies which location the row was ever meant to represent, so it cannot be looked up, shown on a profile, or matched in a search. Removing these rows clears junk data and does not touch any real area a member selected.
Why It Appears
It appears when at least one saved service area is missing its city name (for City-type areas) or its zip code (for Zip-type areas). This is an age-related condition: these text fields were added to the platform later, so areas saved before then have them empty, while newly saved areas include the values from the start.
Two prerequisites must also be met before the step offers its button:
- A Google Maps API key must be saved in your website settings. Every lookup in this migration goes through Google's Geocoding API, and without a key the step shows a red error message instead of a button and cannot run.
- The newer service-area database columns must already exist. They are added by the Multi-Location Add-on installer; if they are missing, this step shows an error asking you to run that update first.
Why It Matters
The city and zip code values identify each service area by name rather than only by map coordinates, and they are the same values the platform saves for newly selected areas. Completing the migration brings your older records up to that same standard, so every member's service areas are stored consistently. This is a data-completeness update: it does not change your website's design or any member-entered content, it fills in blanks on existing location records.
How to Run It
- From the admin dashboard, find the Install New Updates module and click Check For Updates.
- If your site has pending steps, Migrate City - Zip Code Service Areas appears in the list. Click its Perform Step button.
- After it completes, click Check For Updates again — the entry disappears once all steps are done.
If Migrate City - Zip Code Service Areas does not appear in the list, your website is already up to date — the module only shows installers with pending steps, so there is nothing to do.
Unlike most installers, this one runs interactively in your browser, which is why its button is labeled Perform Step. Clicking it opens a progress dialog with a small map, a running total of areas fetched, and a count of batches left. Keep the browser tab open while it works through the lookups; when everything is saved, a confirmation appears and the page reloads.
Each lookup uses your Google Maps API key, so a large migration counts against that key's Geocoding usage quota. If Google reports that the usage limit was reached, the page waits 10 minutes and reloads automatically, then continues with the areas that are still missing values. Progress is saved place by place, so nothing is lost if the page reloads partway through.
After Running
When the dialog finishes it confirms that all coordinates were saved and the page reloads. Click Check For Updates again; the entry disappears once no service areas are missing a city or zip code. Your members' saved areas are unchanged apart from the newly filled-in city and zip code values, and no member action is needed.
If the dialog reports an error while saving, make sure the Bootstrap Theme - Account - Select Locations widget on your site is updated to its latest version, then run the step again. Areas that were already updated keep their values, and the step continues with only the records still missing data.
