Unexpected error on trying to add field

Created on 7 September 2023, about 1 year ago
Updated 9 September 2023, about 1 year ago

I am getting the following error when trying to a Geofield field to a content type.

URL is...admin/structure/types/manage/store/fields/add-field

The website encountered an unexpected error. Please try again later.
TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, class "\geoPHP" not found in call_user_func_array() (line 33 of modules/geofield/src/GeoPHP/GeoPHPWrapper.php).

call_user_func_array(Array, Array) (Line: 33)
Drupal\geofield\GeoPHP\GeoPHPWrapper->getAdapterMap() (Line: 73)
Drupal\geofield\Plugin\Field\FieldFormatter\GeofieldDefaultFormatter->__construct('geofield_default', Array, Object, Array, 'above', 'default', Array, Object) (Line: 88)
Drupal\geofield\Plugin\Field\FieldFormatter\GeofieldDefaultFormatter::create(Object, Array, 'geofield_default', Array) (Line: 64)
Drupal\Core\Field\FormatterPluginManager->createInstance('geofield_default', Array) (Line: 81)
Drupal\Core\Plugin\DefaultLazyPluginCollection->initializePlugin('geofield_default') (Line: 80)
Drupal\Component\Plugin\LazyPluginCollection->get('geofield_default') (Line: 149)
Drupal\Component\Plugin\LazyPluginCollection->getIterator() (Line: 114)
Drupal\Core\Plugin\DefaultLazyPluginCollection->getConfiguration() (Line: 294)
Drupal\Core\Config\Entity\ConfigEntityBase->preSave(Object) (Line: 262)
Drupal\Core\Entity\EntityDisplayBase->preSave(Object) (Line: 562)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 517)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 253)
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 339)
Drupal\Core\Entity\EntityBase->save() (Line: 608)
Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 489)
Drupal\field_ui\Form\FieldStorageAddForm->configureEntityViewDisplay('field_map', NULL, Array) (Line: 379)
Drupal\field_ui\Form\FieldStorageAddForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 114)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 597)
Drupal\Core\Form\FormBuilder->processForm('field_ui_field_storage_add_form', Array, Object) (Line: 325)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
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: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
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: 57)
Drupal\advban\AdvbanMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Under 'Manage Fields' I can see that the field has been added.

However, I am unable to edit that field in any way.

I get the same error.

Drupal: 9.5.10
PHP: 8.1.22
MySQL: 5.7.43
Memory limit: 1024M

EDIT: The library is located here: /libraries/geoPHP

💬 Support request
Status

Fixed

Version

1.55

Component

Miscellaneous

Created by

🇮🇳India newswatch Delhi/Bangalore

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

Comments & Activities

Production build 0.71.5 2024