unable to geocode with argisonline

Created on 5 March 2025, 28 days ago

Problem/Motivation

this was fixed in a patch for another version , but a new patch needs to be made for this version
https://www.drupal.org/files/issues/arcgisonline_plugin_does_not_exist-1... โ†’

diff --git a/modules/contrib/geocoder/src/Plugin/Geocoder/Provider/ArcGISOnline.php b/modules/contrib/geocoder/src/Plugin/Geocoder/Provider/ArcGISOnline.php
index a77d484..c7ea144 100644
--- a/modules/contrib/geocoder/src/Plugin/Geocoder/Provider/ArcGISOnline.php
+++ b/modules/contrib/geocoder/src/Plugin/Geocoder/Provider/ArcGISOnline.php
@@ -8,7 +8,7 @@
  * Provides an ArcGISOnline geocoder provider plugin.
  *
  * @GeocoderProvider(
- *   id = "arcgisonline",
+ *   id = "ArcGISOnline",
  *   name = "ArcGISOnline",
  *   handler = "\Geocoder\Provider\ArcGISOnline",
  *   arguments = {

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Active

Version

4.28

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States dianacastillo Miami

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

Comments & Activities

  • Issue created by @dianacastillo
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States dianacastillo Miami

    i just made the change in 8.x-4x as you can see above can someone merge this into the latest module ?

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly itamair

    Thanks @dianacastillo for reporting this
    But it looks to me you are rushing and not providing proper context.

    You mention that this change was already made for another version, but you donโ€™t provide where this change was made, and for which version.
    Can you provide reference to the parent (or related) issue you are speaking about, or just the link to โ€œthatโ€ commit?
    So this audience could better understand what kind of regression you are referring to, and how to reproduce.

    Also, once you create a fork you should also generate a MR (merge request) if you ask for final review and eventual merge of it.

    I will be able to better inspect this tomorrow (if you please provide better info and context) and merge it, eventually, if worth to be approved.

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly itamair

    I better inspected this, and nothing looks wrong to me in the actual 8.x-4.x code,
    and everything (still) works correctly with the "ArcGisOnline" (id = "arcgisonline") Geocoder provider.

    Changing this into "Support Request" (because no proof/evidence of Bug) and closing as everything "works as designed" ...

    Please provide better info context next time, and make better internal debug, because everybody time is precious.
    and please don't reopen this without clear evidence / proof of your assumptions..

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly itamair

    Adding reference to the parent issue, that I had do autonomously look for ... and find,
    and that wasn't approved and merged, because not needed.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States dianacastillo Miami

    It doesnt work for me with the lower case. maybe you arent testing it on a linux machine?

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly itamair

    Well ... the server type shouldn't make any difference in my opinion,
    BUT (anyway) of course we are also testing all this on Linux based servers.

    More specifically it works correctly locally on DDEV docker web image: https://hub.docker.com/r/ddev/ddev-webserver
    and it also works correctly here: https://www.geodemocracy.com/drupal_geofield_stack_demo/web/
    that is (of course) based on linux servers ...

    BUT, rather then going around vague assumptions, why you don't provide more info on your error logs ... ?
    what is not working with your "arcgisonline" provider instance?
    Are you able to XDebug what is happening on your code workflow?
    Are you checking it locally .. or directly on the production server? (not nice practice, in such latter case).

    I am pretty confident that it could highly depend on your specific configuration setup. May be something was messed up in your Arcgisonline configuration setup ...
    Would highly recommend you to remove all of it and re require it via composer
    composer require geocoder-php/arcgis-online-provider
    and re-enable it from scratch with your Drupal backend configuration.

    The original lower case
    id = "arcgisonline"
    never changed over the last bunch of years, and no-one reported this same issue of your, for a Geocoder provider that is basically free for use, and definitely much used also with this Drupal Geocoder module ...
    No-one else have reported this same issue ...

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States dianacastillo Miami

    I am using lando and php 8.2 I just tried again - with this code I get an error :/**
    * Provides an ArcGisOnline geocoder provider plugin.
    *
    * @GeocoderProvider(
    * id = "arcgisonline",
    * name = "ArcGisOnline",
    * handler = "\Geocoder\Provider\ArcGISOnline\ArcGISOnline",
    * arguments = {
    * "sourceCountry" = ""
    * }
    * )
    */

    with this code I dont /**
    * Provides an ArcGisOnline geocoder provider plugin.
    *
    * @GeocoderProvider(
    * id = "ArcGISOnline",
    * name = "ArcGisOnline",
    * handler = "\Geocoder\Provider\ArcGISOnline\ArcGISOnline",
    * arguments = {
    * "sourceCountry" = ""
    * }
    * )
    */

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States dianacastillo Miami

    this is the error i get

    https://account-stage.americorps.gov/admin/config/system/geocoder/geocoder-provider
    Message	Drupal\Component\Plugin\Exception\PluginNotFoundException: The "ArcGISOnline" plugin does not exist. Valid plugin IDs for Drupal\geocoder\ProviderPluginManager are: ArcGisOnline, googlemaps, googlemaps_business, random, file, gpxfile, geojsonfile, kmlfile in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of /mnt/www/html/vistacampstg/docroot/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).

    and the geocoder.geocoder_provider.argsonline.yml has this so for some reason hte plugin has to have the exact case as the plugin thats why if i change the id to be ArcGISOnline it works

    uuid: 15459270-97d6-4454-b498-aaed5cf1fe25
    langcode: en
    status: true
    dependencies: { }
    id: arcgisonline
    label: ArcGisOnline
    plugin: ArcGISOnline
    configuration:
    geocoder:
    locale: ''

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States dianacastillo Miami

    i have this in my composer (not sure why its there it was there when i got on the project ) maybe its related to the problem ? "autoload": {

          "psr-4": {
                "Geocoder\\Provider\\ArcGISOnline\\": ""
            },
            "exclude-from-classmap": [
                "/Tests/"
            ]
        },
Production build 0.71.5 2024