Error: Class 'Geocoder\Provider\AbstractProvider' not found in include()

Created on 8 May 2020, over 5 years ago
Updated 15 July 2025, 3 months ago

Dear Drupal Friends:

After upgrading to 8.x-3.1 of Geocoder, I am now getting an error message. I am using Drupal core 8.8.5

It seems to happen consistently when I click on the Providers tab. The error message is also displayed after creating a "Text (plain)" field in a content type that does not contain any geocoding fields. I have Flushed all caches and the white screen error persists.

The geocoded map that I defined previously appears to still function properly. My geocoding fields are defined in a profile and they do not appear to be impacted.

The website encountered an unexpected error. Please try again later.
Error: Class 'Geocoder\Provider\AbstractProvider' not found in include() (line 20 of modules\contrib\geocoder\modules\geocoder_field\src\Geocoder\Provider\File.php).

include() (Line: 444)
Composer\Autoload\includeFile('C:\xampp\htdocs\pdmedia/modules/contrib/geocoder/modules/geocoder_field/src\Geocoder\Provider\File.php') (Line: 322)
Composer\Autoload\ClassLoader->loadClass('Drupal\geocoder_field\Geocoder\Provider\File')
spl_autoload_call('Drupal\geocoder_field\Geocoder\Provider\File')
class_exists('\Drupal\geocoder_field\Geocoder\Provider\File') (Line: 50)
{closure}(Array)
array_filter(Array, Object) (Line: 51)
geocoder_geocoder_provider_info_alter(Array, NULL, NULL) (Line: 539)
Drupal\Core\Extension\ModuleHandler->alter('geocoder_provider_info', Array) (Line: 366)
Drupal\Core\Plugin\DefaultPluginManager->alterDefinitions(Array) (Line: 288)
Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() (Line: 175)
Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() (Line: 71)
Drupal\geocoder\Form\GeocoderProviderCreationForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 520)
Drupal\Core\Form\FormBuilder->retrieveForm('geocoder_provider_creation_form', Object) (Line: 277)
Drupal\Core\Form\FormBuilder->buildForm('Drupal\geocoder\Form\GeocoderProviderCreationForm', Object) (Line: 218)
Drupal\Core\Form\FormBuilder->getForm('Drupal\geocoder\Form\GeocoderProviderCreationForm') (Line: 76)
Drupal\geocoder\GeocoderProviderListBuilder->render() (Line: 23)
Drupal\Core\Entity\Controller\EntityListController->listing('geocoder_provider')
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
🐛 Bug report
Status

Closed: works as designed

Version

3.1

Component

Code

Created by

🇺🇸United States frmcclurg

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.

  • 🇩🇪Germany Peter Majmesku 🇩🇪Düsseldorf

    This is not really a fix, but it works as a workaround, at least:

      "autoload": {
        "files": [
          "vendor/willdurand/geocoder/Provider/Provider.php",
          "vendor/willdurand/geocoder/Provider/AbstractProvider.php"
        ]
      }
    
  • 🇩🇪Germany Peter Majmesku 🇩🇪Düsseldorf

    Later this did not help and the following helped me in my projects composer.json file:

      "autoload": {
        "psr-4": {
          "Geocoder\\": "vendor/willdurand/geocoder"
        }
      }
    
Production build 0.71.5 2024