Map Control - Geocoder sends AJAX Request to wrong URL

Created on 4 July 2022, over 2 years ago
Updated 13 December 2023, about 1 year ago

Problem/Motivation

I have a geolocation field on a content type, that i'm using the Geocoder control on. The default "caption" is Address, so I'm assuming that I can put an address in the field and have it geocode the latitude/longitude for the field. Unfortunately when editing the node, the AJAX requests are being sent to edit?q=(whatever is in the geocoder field) or whatever the content type creation URL is for a new node, which results in HTML being returned to the widget, where I'm guessing JSON or something else should be coming back

Steps to reproduce

  1. Add a geolocation field to a content type.
  2. Configure it to use the "Geolocation Leaflet - Geocoding and Map" Widget
  3. Enable the "Map Control - Geocoder" Feature. The only geocoder plugin I have available is Photon.
  4. Create a new node of that content type
  5. When observing the network traffic in the browser developer tools, the requests are going to what I'm guessing is an incorrect URL as noted above.

Proposed resolution

I've not gone through the module code to figure out where this is happening. And for all I know, it may be a configuration matter with my widget as well, and if that's a concern, I'm happy to provide more of the configuration.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

3.0

Component

Javascript General / Frontend

Created by

πŸ‡ΊπŸ‡ΈUnited States jasondmichaelson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States AaronBauman Philadelphia

    same problem here in latest 3.x dev with Google Maps API, so i think it's a general problem

  • πŸ‡©πŸ‡ͺGermany christianadamski Berlin, Germany

    Google works fine for me, but for Leaflet can confirm

  • πŸ‡©πŸ‡ͺGermany christianadamski Berlin, Germany

    Ok, so what I see trying on simplytest.me, is that when simply choosing the map widget, the "nominatim" geocoder will be set, which is not usable in the frontend.

    This is no problem when opening the widget settings at least once, as then a different one will be set.

    Not ideal, but not broken.

    @flyke: that seems to be a different issue. Please open a separate ticket, if the issue still persists.

    I'm closing this issue, as I'm focused on getting v4 ready. Sorry for the inconvience.

Production build 0.71.5 2024