# Locations Plugin 🌍

**URL:** https://meta.discourse.org/t/locations-plugin/69742
**Category:** Plugin
**Tags:** paid-support
**Created:** [September 10, 2017, 10:36am UTC](https://meta.discourse.org/t/locations-plugin/69742 "2017-09-10T10:36:41Z")
**Posts on this page:** 17
**Page:** 37

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [April 24, 2026, 5:57pm UTC](https://meta.discourse.org/t/locations-plugin/69742/1235 "2026-04-24T17:57:51Z")

</div>

So a sneak peak of some prototype work I’m doing.

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/8/d/28deb5c595bf5bce0b4ea50d9befc063de386f22.jpeg)

I’m going to be looking at giving early access to this for current and recent backers for a period (regardless of sponsorship level)

Going forward I have will be offering early access to some new features from $7/month for individual sponsors/small communities and $40/month for business.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [April 25, 2026, 10:33am UTC](https://meta.discourse.org/t/locations-plugin/69742/1236 "2026-04-25T10:33:33Z")

</div>

Initial invites to early access have just gone out for current sponsors. I’ll widen this to past sponsors soon and this access will remain for a period, after which maintaining a minimum level of sponsorship will be required.

Sponsor list is reviewed daily, so [please consider sponsoring me](https://github.com/sponsors/merefield) if you are keen to use the latest features on Locations and/or generally keen to support my work.

Backers will always get fixes first.

Features will be migrated to the public repo on a case by case basis and after a delay …

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [May 6, 2026, 4:21am UTC](https://meta.discourse.org/t/locations-plugin/69742/1237 "2026-05-06T04:21:59Z")

</div>

I’ve just been implementing the awesome Automated User Location Determination, which involves configuring Maxmind properly. This was on a new instance.

The new app.yml is lovely and lean, but doesn’t include the Maxmind ENV variables as a comment any more.

If this is to be more accessible to less confident self-hosting sysadmins, we might need a clear explainer - and to point them to this topic:

> [@Configure MAXMIND for reverse IP lookups](https://meta.discourse.org/t/configure-maxmind-for-reverse-ip-lookups/173941):
>
> What is MAXMIND and why would I want it? Discourse uses [MAXMIND](https://www.maxmind.com/en/home) to provide geographical information for reverse IP lookups. Without Maxmind’s database you’ll see something like this: Or perhaps you’ve noticed this message fly by when you rebuild your container: MaxMind IP database download requires an account ID and a license key Please set DISCOURSE\_MAXMIND\_ACCOUNT\_ID and DISCOURSE\_MAXMIND\_LICENSE\_KEY. See https://meta.discourse.org/t/configure-maxmind-for-reverse…

* * *

### Also - a minor UX thing

An unwanted (by me anyway) link to the map pops up on the sidebar, and this isn’t governed by any settings. I’ve hidden it thus:

```scss
// hide the users map link
.sidebar-sections li[data-list-item-name="users map"] {
    display: none;
}

```

Perhaps it is time to deprecate both this and the (setting controlled) topic map link? These can now easily be added via the standard UI if the admin wishes to have them.

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [May 6, 2026, 6:19am UTC](https://meta.discourse.org/t/locations-plugin/69742/1238 "2026-05-06T06:19:04Z")

</div>

> [@nathank](#):
>
> Perhaps it is time to deprecate both this and the (setting controlled) topic map link? These can now easily be added via the standard UI if the admin wishes to have them.

Links the admin adds to the sidebar are currently not translatable. So for a community where users might prefer different interface languages, the plugin adding the link to the sidebar provides the option to translate and display them in multiple languages.

---

<div class="post-metadata">

### Author: ![gilles](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gilles/32/549022_2.png) [@gilles](https://meta.discourse.org/u/gilles)
#### Post date: [May 9, 2026, 12:35pm UTC](https://meta.discourse.org/t/locations-plugin/69742/1239 "2026-05-09T12:35:35Z")

</div>

I noticed that I cannot enable geolocation for topics in a category.

It doesn’t offer to save the changes 🤔 (I’m on version **2026.5.0-latest** )

 ![image](https://global.discourse-cdn.com/meta/original/4X/e/0/8/e08461815980cc1b2a99054ccaffe075dfc40b74.png)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [May 9, 2026, 10:46pm UTC](https://meta.discourse.org/t/locations-plugin/69742/1240 "2026-05-09T22:46:41Z")

</div>

This should be fixed now.

The fix should be deployed to Early Access and Public versions of the repo, together with a whole host of compatibility fixes.

As a part of that work I’ve increased the difference between the versions.

The Early Access version exposed to sufficiently privileged Sponsors has the following features which the public version of Locations currently lacks:

| Title | Description |
| --- | --- |
| Users-map globe | Adds an interactive 3D globe view for the Users Map, with avatars placed by location, drag/touch rotation, zoom, reset, search focus, user-card clicks, and always-on bump mapping. |
| Globe screen saver | Optional experimental idle screen saver showing a rotating 3D globe with user avatars below the header. |
| Enhanced users-map filters | Adds controls for result limit, search type, search term, and group filtering on the Users Map. |
| Nearby topic filter | Adds a nearby topic-list filter based on distance from the current user’s location. |
| IP-based user location lookup | Automatically estimates and stores user locations from IP data, with configurable trigger mode, granularity, cooldown, GeoNames resolution, skip-if-existing behavior, and debug logging. |

This means the maintained public version has been slightly downgraded. I’m afraid that’s necessary to ensure my sponsors get sufficient benefit.

If you would like these extra features, [consider sponsoring me](https://github.com/sponsors/merefield) and making sure you go for a monthly tier which includes Early Access. Sponsoring me at the right tier will give you access to the Early Access version within 24 hours.

---

<div class="post-metadata">

### Author: ![gilles](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gilles/32/549022_2.png) [@gilles](https://meta.discourse.org/u/gilles)
#### Post date: [May 10, 2026, 7:45am UTC](https://meta.discourse.org/t/locations-plugin/69742/1241 "2026-05-10T07:45:44Z")

</div>

Thanks @merefield for your speed 👍.

---

<div class="post-metadata">

### Author: ![Roi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roi/32/130587_2.png) [@Roi](https://meta.discourse.org/u/Roi)
#### Post date: [August 7, 2026, 11:10pm UTC](https://meta.discourse.org/t/locations-plugin/69742/1242 "2026-08-07T23:10:43Z")

</div>

I just stumbled upon a deprecation notice with the newest version of Discourse:

> [PLUGIN discourse-locations] DEPRECATION NOTICE: Using api.modifyClass on `model:composer` is deprecated. Use the `addModelField`, `addModelAccessor`/`addModelGetter`/`addModelSetter`, `addModelMethod`, `addModelSaveProperty` and `addModelCallback` APIs instead. [deprecated since Discourse 2026.8] [deprecation id: discourse.modify-class-model]

I tried with my imaginary friend but it seems to be above my rudimentary programming skills… 🙈

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [August 8, 2026, 10:45am UTC](https://meta.discourse.org/t/locations-plugin/69742/1243 "2026-08-08T10:45:33Z")

</div>

FYI:

```plaintext
[Admin Notice] Plugin 'discourse-locations' contains code which needs updating. (id:discourse.modify-class-model)

```

---

<div class="post-metadata">

### Author: ![Viddekla](https://avatars.discourse-cdn.com/v4/letter/v/a4c791/32.png) [@Viddekla](https://meta.discourse.org/u/Viddekla)
#### Post date: [August 8, 2026, 11:02am UTC](https://meta.discourse.org/t/locations-plugin/69742/1244 "2026-08-08T11:02:22Z")

</div>

I have the same issue:

> [@Admin notes after the latest update](https://meta.discourse.org/t/admin-hinweise-nach-letztem-update/409587):
>
> [Admin Note] Plugin ‘discourse-locations’ contains code that needs to be updated. (ID:discourse.modify-class-model)​ [Admin Note] One of your themes or plugins contains code that needs to be updated. (ID:discourse.legacy-array-like-object.proxied-array) Since the last update, I keep getting these two error messages. What can I do about them?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [August 8, 2026, 5:49pm UTC](https://meta.discourse.org/t/locations-plugin/69742/1245 "2026-08-08T17:49:27Z")

</div>

This issue has been resolved with a contribution from @cvx 🙏 (5 days ago in fact! 😅 )

Recent PRs

| PR | Main purpose | Author |
| --- | --- | --- |
| [#168](https://github.com/merefield/discourse-locations/pull/168) | Update Ruby and JavaScript dependencies to resolve security alerts. | angusmcleod |
| [#169](https://github.com/merefield/discourse-locations/pull/169) | Replace deprecated Composer `modifyClass` usage with modern model extension APIs. | cvx |
| [#171](https://github.com/merefield/discourse-locations/pull/171) | Expand Composer location-default tests and fix location syncing when switching categories. | merefield |
| [#172](https://github.com/merefield/discourse-locations/pull/172) | Synchronize plugin linting and development tooling with the current Discourse plugin skeleton. | merefield |
| [#173](https://github.com/merefield/discourse-locations/pull/173) | Upgrade the Ruby `json` gem from 2.21.1 to 2.21.2 to fix a use-after-free vulnerability. | dependabot |
| [#174](https://github.com/merefield/discourse-locations/pull/174) | Restore location-search error handling, prevent empty geocoding requests, and improve map safeguards and regression coverage. | merefield |

Thanks to @angus and @cvx for their contributions.

This has been applied to both the free plugin and sponsors only early access plugin.

In addition the code responsible for allowing you to discuss User Locations with [Chatbot](https://meta.discourse.org/t/discourse-chatbot/256652) has been moved to Locations Early Access to further enhance the additional functional capability of the sponsors only repo.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [August 12, 2026, 4:59pm UTC](https://meta.discourse.org/t/locations-plugin/69742/1246 "2026-08-12T16:59:24Z")

</div>

Today I back-ported several non-functional improvements from early access to the main plugin:

> <https://github.com/merefield/discourse-locations/pull/175>
>
> Previously, fixes and performance improvements developed on the early-access bra…nch remained coupled to features that were not intended for the base plugin.
> 
> This change back-ports improvements that belong in the public base plugin, providing a cleaner and tested foundation for a separate early-access extension. It does not add a new product feature or expose an early-access capability; it corrects, optimizes, and refactors existing base-plugin behavior.
> 
> \## Improvements included
> 
> \- Parse stored user locations consistently before upserting map records:
> - Accept serialized JSON and already-parsed hashes.
> - Ignore malformed, missing, or incomplete values safely.
> - Preserve the complete persisted location data when valid.
> \- Tighten users-map responses and selection:
> - Return only the identity, avatar, latitude, and longitude data map clients need.
> - Respect the core \`enable\_names\` setting.
> - Sort by \`last\_seen\_at DESC\`, place never-seen users last, and break equal timestamps by directory-item ID.
> - Apply the existing \`location\_users\_map\_limit\` setting after ordering, so the default 50-user cap consistently selects the most recently active eligible users.
> \- Extract the standard map topic query into a reloadable \`TopicQuery\` concern:
> - Return mapped topics only.
> - Enforce the configured maximum topic count.
> - Preserve global and category-specific closed-topic filtering.
> \- Use the serializer-provided user location for composer defaults while retaining the custom-field fallback.
> \- Parse user locations in regular directory responses instead of returning JSON strings.
> \- Allow long, unbroken location labels to wrap without escaping the user card.
> \- Remove the legacy global \`DMenu\` modal patch now that Discourse core handles keyboard input in float-kit menus rendered from modals.
> \- Add browser regressions for real keyboard entry and browser-geolocation selection inside the add-location modal.
> \- Use Zeitwerk for namespaced plugin code and the supported topic-list custom-field preload API.
> \- Refresh development and release tooling:
> - Remove the obsolete legacy ESLint configuration now that the repository uses the flat config.
> - Enforce the declared Node engine and prevent pnpm from silently installing peer dependencies.
> - Exclude vendored Leaflet styles from plugin style linting.
> - Check plugin version increments with Ruby's \`Gem::Version\`, removing the workflow's Node and npm dependency.
> \- Bump the plugin patch version to \`7.3.6\`.
> 
> \## Out of scope
> 
> \- Nearby topic filtering and its distance or bearing calculations.
> \- Automatic IP-based user-location lookup, including MaxMind and GeoNames integration.
> \- Location-aware Chatbot tools.
> \- The 3D users-map globe, globe textures, and idle screensaver.
> \- Early-access users-map controls for group, search type, search term, and result-limit filtering.
> \- Early-access-only settings, routes, assets, jobs, supporting libraries, and tests.
> \- Renaming the private plugin or changing sponsor installations to load both repositories.
> \- Adding the backend modifiers and frontend outlets needed for the private repository to become a duplication-free extension; those belong to the next extraction phase.
> 
> \## Validation
> 
> \- Focused Ruby coverage: 14 examples, 0 failures.
> \- Plugin browser suite: 23 passing, 2 pre-existing skips, 0 failures.
> \- The skipped QUnit cases cover category and global topic-map population; both scenarios are exercised with real Leaflet rendering in \`spec/system/topic\_map\_spec.rb\`.
> \- Core modal-menu browser regression: 1 example, 0 failures.
> \- Focused Ruby and frontend linting passed.
> \- Style linting, type checking, and the complete plugin \`pnpm lint\` suite passed.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [August 21, 2026, 2:02pm UTC](https://meta.discourse.org/t/locations-plugin/69742/1247 "2026-08-21T14:02:20Z")

</div>

Similar to the [Bookmark Notes Plugin](https://meta.discourse.org/t/bookmark-notes/409685), I’ve restructured Locations so that in order to use it, you need the base plugin in any case, whether you are a pro sponsor or not.

This was necessary to streamline maintenance activity. This will help ensure the basic functionality gets more timely support. It also establishes the previously name “early access” version as a definite premium extension with features exclusive to sponsors.

Please replace the old early-access clone command in your app.yml with these, keeping the base plugin first:

```plaintext
  git clone https://github.com/merefield/discourse-locations.git
  git clone https://YOUR_GITHUB_USERNAME:YOUR_TOKEN@github.com/merefield/discourse-locations-pro-ext.git

```

Then rebuild Discourse normally. Your existing location data will be retained - no manual migration is required.

Your repository access should continue after the rename. If you encounter an access or installation problem, please send me a message and I’ll be happy to help.

No action is needed for non-sponsors - the base plugin has received updates but your site should continue to build as normal with it!

Thanks for your continued support!

**[Sponsor me from at least the $7/month Bronze tier on GitHub to get access to Locations Pro](https://github.com/sponsors/merefield)**

### Features

Discourse Locations provides the complete location-storage, geocoding, and map foundation. The optional Pro extension adds advanced discovery, automation, and users-map presentation while requiring this base plugin.

| Feature | Base plugin | Pro extension |
| --- | --- | --- |
| Structured topic locations and configurable input fields | ✅ | — |
| Optional or required geocoding with multiple providers | ✅ | — |
| Category and site-wide topic map views | ✅ | — |
| User locations on posts, profiles, cards, and the directory map | ✅ | — |
| Leaflet users map with local name and username search | ✅ | — |
| Configurable location labels, flags, map markers, clustering, and tiles | ✅ | — |
| Default a new topic to the current user’s location | ✅ | — |
| Automated IP-based user-location estimation | — | ✅ **Exclusive** |
| Nearby-topic discovery based on the current user’s location | — | ✅ **Exclusive** |
| Optional location-aware [Discourse Chatbot](https://meta.discourse.org/t/discourse-chatbot/256652) tools | — | ✅ **Exclusive** |
| Permission-aware group and result-limit users-map filters | — | ✅ **Exclusive** |
| Interactive WebGL users-map globe | — | ✅ **Exclusive** |
| Idle globe screen saver | — | ✅ **Exclusive** |

Installing Pro now adds its exclusive features to the base functionality; it does not replace the base plugin.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [August 27, 2026, 9:46pm UTC](https://meta.discourse.org/t/locations-plugin/69742/1248 "2026-08-27T21:46:54Z")

</div>

This was added as a workaround some time back, but since then PM CSS looks more like a normal topic, so out it goes and you get your nice PM user location label alignment back, nice!:

> <https://github.com/merefield/discourse-locations/pull/184>
>
> Previously, narrow PM post metadata applied a legacy 44px left margin to user lo…cation labels, which could misalign long locations against the current core PM layout.
> 
> This change removes the obsolete PM-specific offset so location labels use the shared post metadata alignment.

---

<div class="post-metadata">

### Author: ![neilernst](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neilernst/32/576202_2.png) [@neilernst](https://meta.discourse.org/u/neilernst)
#### Post date: [September 2, 2026, 4:24am UTC](https://meta.discourse.org/t/locations-plugin/69742/1249 "2026-09-02T04:24:01Z")

</div>

Is there a way to save custom locations? For example a remote mountain hut a number of people use - there is no easy way to search for it as the location is found by coordinates, not a name. If there was a way to save a set of lat/long coordinates with a custom name that would be very useful.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [September 2, 2026, 7:12am UTC](https://meta.discourse.org/t/locations-plugin/69742/1250 "2026-09-02T07:12:37Z")

</div>

Yes. You can save just the Coords to a Topic.

Just make sure:

 ![Screenshot_20260902-081300](https://global.discourse-cdn.com/meta/original/4X/d/d/5/dd553e28ceda4635c7e48ddb5475f88f39d08dfd.png)

 ![Screenshot_20260902-081048](https://global.discourse-cdn.com/meta/original/4X/4/e/1/4e185089e727fa4f61893437aae0166c4716a2fd.png)

If you turn input fields off you can use generic search so long as the location has an entry in your geolocation provider:

 ![image](https://global.discourse-cdn.com/meta/original/4X/3/0/7/30736c891286b877e4502b94fbac4e1044045fc3.png)

---

<div class="post-metadata">

### Author: ![darkpixlz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/darkpixlz/32/549896_2.png) [@darkpixlz](https://meta.discourse.org/u/darkpixlz)
#### Post date: [September 22, 2026, 6:45pm UTC](https://meta.discourse.org/t/locations-plugin/69742/1251 "2026-09-22T18:45:57Z")

</div>

6 posts were merged into an existing topic: [[Admin Note] One of your themes or plugins contains code that needs to be updated](https://meta.discourse.org/t/admin-hinweis-eines-deiner-themes-oder-plug-ins-enthalt-code-der-aktualisiert-werden-muss/412840/15)

[Previous page](https://meta.discourse.org/t/locations-plugin/69742.md?page=36)
