Appearance
Upgrading to 4.0
4.0.0 is a major release. Most sites update without changes, but read this page before you update. All changes are in the changelog.
Follow the update instructions. Make a backup of the files and the database first, and test the update on a copy of your site when you can.
Requirements
4.0.0 requires ExpressionEngine 7.3+ and PHP 8.2+, see the prerequisites. For ExpressionEngine 6 and lower use the legacy package in the download (legacy/ee_maps_locator-v3.5.0.zip).
Before the update
- Still using the old
Gmaps Datamodule? The migration page is removed. Install the legacy package (ee_maps_locator-v3.5.0.zip) first, migrate your data with it and then update to 4.0. See Migrate from Gmaps.
Check your templates
- The settings of the
search_formtag are signed, so a visitor can't change the channel, status or result page. A hand-written form that posts to the search action without thesearch_formtag no longer works, and pages with the search form in a static cache have to be cleared after the update. - An unknown
metricon thesearch_formtag useskm, an unknown search type usesradius. - The variables of all tags (e.g.
{location},{city},{street_name}) are HTML-escaped (&becomes&), so they are safe in HTML and attributes. Use them as is; to compare them in a conditional, compare with the escaped value. - The
querytag only returns locations of entries with statusopenand at most 50 by default; setstatusandlimitwhen you need other statuses or more locations. - The
radius,search_resultandquerytags no longer return the locations of expired entries or of entries with an entry date in the future. Addshow_expired="yes"and/orshow_future_entries="yes"when you need them. - The unused
{reinos_maps_locator_action_url}global variable is removed.
After the update
- Updating from a version before 2.2.0? Run Reindex All in the CP (Locations) once, so every location gets the status of its entry.
- The warmup-cache URL needs a secret token now. Copy the new URL from the settings in the CP (Cache settings) into your cron job; the URL of older versions without the token is refused.
- The locations of a deleted entry are now removed from the search index.
- The
search_resulttag no longer looks up the address of latlng locations while the page is rendered. With Reverse Geocode latlng disabled, run the warmup-cache URL from a cron job so those locations get their address data. - Run Reindex All once: locations without a city district (
sub_locality) were not searchable with thelocalitysearch type, the search index can contain leftovers of old categories, and a Maps Fieldtype in a Grid only had the locations of its last row.
For developers
The
latandlngcolumns ofexp_reinos_maps_locator_locationsareDECIMAL(10,7)(were text); coordinates that were not a number areNULLafter the update.The installer uses the ExpressionEngine 7 add-on installer and migrations; hooks, actions and tags use the ExpressionEngine 7 add-on controllers.
