I am on the 8.x-1.x-dev branch of the plugin, and the 8.0.x branch of Drupal core.

Whenever I try to save any node containing a geofield field, I receive the following error:

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "GeoType" plugin does not exist. in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 57 of core\lib\Drupal\Component\Plugin\Discovery\DiscoveryTrait.php).
Drupal\Core\Plugin\DefaultPluginManager->getDefinition('GeoType')
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('GeoType', Array)
Drupal\Component\Plugin\PluginManagerBase->createInstance('GeoType', Array)
Drupal\Core\Validation\ConstraintManager->create('GeoType', Array)
Drupal\Core\TypedData\TypedData->getConstraints()
Drupal\Core\TypedData\Validation\TypedDataMetadata->getConstraints()
Drupal\Core\TypedData\Validation\TypedDataMetadata->findConstraints('Default')
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object, NULL, 1)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validate(Object, NULL, NULL)
Drupal\Core\TypedData\Validation\RecursiveValidator->validate(Object)
Drupal\Core\TypedData\TypedData->validate()
Drupal\Core\Entity\ContentEntityBase->validate()
Drupal\Core\Entity\ContentEntityForm->validateForm(Array, Object)
call_user_func_array(Array, Array)
Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'node_dive_locations_form')
Drupal\Core\Form\FormValidator->validateForm('node_dive_locations_form', Array, Object)
Drupal\Core\Form\FormBuilder->processForm('node_dive_locations_form', Array, Object)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object)
Drupal\Core\Entity\EntityFormBuilder->getForm(Object)
Drupal\node\Controller\NodeController->add(Object)
call_user_func_array(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1)
Stack\StackedHttpKernel->handle(Object, 1, 1)
Drupal\Core\DrupalKernel->handle(Object)

Thanks for the help, as I am new to Drupal 8, and couldn't understand how to get the Validation Constraint declared.

Comments

vdsh’s picture

Issue summary: View changes
vdsh’s picture

Status: Active » Closed (duplicate)

Actually it's a duplicate of the issue, with the patch posted here:
https://www.drupal.org/node/1957760#comment-10124388

balagan’s picture

That patch did not solve my problem, I am still seeing the issue after uninstalling and reinstalling geofield. See my comment here: https://www.drupal.org/node/1957760#comment-10621184

balagan’s picture

Status: Closed (duplicate) » Active
kpv’s picture

Status: Active » Closed (duplicate)

@balagan
try rebuilding the cache

barrypoore’s picture

I'm seeing the same issue, installed Geofield 8.x-1.0-alpha1 on Drupal 8.0.1, went to save a node, got "The website encountered an unexpected error. Please try again later."

Looked in the error console and got:

Uncaught PHP Exception Drupal\Component\Plugin\Exception\PluginNotFoundException: "The "GeoType" plugin does not exist." at /Users/mywebsite/mampsites/d8test/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php line 57

I'm also having trouble with the D8 Address field

Rebuilding the cache didn't help, I'd be interested to see if anyone has a fix for this.

neha.gangwar’s picture

@barrypoore
I am facing the same problem. Have you found any solution for that?

balagan’s picture

I think downloading a new version of drupal and reinstalling it solved the problem. As I remember, I had some composer problems, that might have been related to this: https://www.drupal.org/node/2629772
I think solving that issue solved this. Obviously there were some autoloading problems, which are now gone.

neha.gangwar’s picture

I have upgraded my site to 8.0.2 and again try to install the module. Still the error persists.

kentr’s picture

Resetting caches got rid of the error for me.

My case:

  • Drupal 8.0.2
  • Geofield 8.x-1.x-dev
  • GeoPHP 8.x-1.x-dev

  • Custom content entity with a geofield attached.

Error msg:

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "GeoType" plugin does not exist. in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 57 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).

Drupal\Core\Plugin\DefaultPluginManager->getDefinition('GeoType')
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('GeoType', Array)
Drupal\Component\Plugin\PluginManagerBase->createInstance('GeoType', Array)
Drupal\Core\Validation\ConstraintManager->create('GeoType', Array)
Drupal\Core\TypedData\TypedData->getConstraints()
Drupal\Core\TypedData\Validation\TypedDataMetadata->getConstraints()
Drupal\Core\TypedData\Validation\TypedDataMetadata->findConstraints('Default')
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object, NULL, 1)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validate(Object, NULL, NULL)
Drupal\Core\TypedData\Validation\RecursiveValidator->validate(Object)
Drupal\Core\TypedData\TypedData->validate()
Drupal\Core\Entity\ContentEntityBase->validate()
Drupal\Core\Entity\ContentEntityForm->validateForm(Array, Object)
call_user_func_array(Array, Array)
Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'climbing_area_edit_form')
Drupal\Core\Form\FormValidator->validateForm('climbing_area_edit_form', Array, Object)
Drupal\Core\Form\FormBuilder->processForm('climbing_area_edit_form', Array, Object)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1)
Stack\StackedHttpKernel->handle(Object, 1, 1)
Drupal\Core\DrupalKernel->handle(Object)