Problem/Motivation
After enabling the DEV version of this module, the form display page of all content types throw the following error, this did not happen with the beta1 version.
The website encountered an unexpected error. Please try again later.
Error: Class 'Drupal\select2\Plugin\Field\FieldWidget\Select2EntityReferenceWidget' not found in require() (line 23 of modules/contrib/entity_reference_views/src/Plugin/Field/FieldWidget/Select2ViewsWidget.php).
require() (Line: 112)
Symfony\Component\ClassLoader\ApcClassLoader->loadClass('Drupal\entity_reference_views\Plugin\Field\FieldWidget\Select2ViewsWidget')
spl_autoload_call('Drupal\entity_reference_views\Plugin\Field\FieldWidget\Select2ViewsWidget')
class_exists('Drupal\entity_reference_views\Plugin\Field\FieldWidget\Select2ViewsWidget') (Line: 96)
Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass('entity_reference_views_select2', Array) (Line: 800)
Drupal\field_ui\Form\EntityDisplayFormBase->getApplicablePluginOptions(Object) (Line: 310)
Drupal\field_ui\Form\EntityDisplayFormBase->buildFieldRow(Object, Array, Object) (Line: 40)
Drupal\field_ui\Form\EntityFormDisplayEditForm->buildFieldRow(Object, Array, Object) (Line: 218)
Drupal\field_ui\Form\EntityDisplayFormBase->form(Array, Object) (Line: 149)
Drupal\Core\Entity\EntityForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 532)
Drupal\Core\Form\FormBuilder->retrieveForm('entity_form_display_edit_form', Object) (Line: 278)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 91)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
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)
Steps to reproduce
- Enable the DEV version of the module.
- Create a content type.
- Browse to the content type's form display page.
Comments
Comment #2
mohit.bansal623 commentedPlease review.
Comment #3
Syntapse commentedstill an issue today. subscribing for a stable fix on new release
Comment #4
ilciacio commentedApplying the patch dose not solve the issue.
Install and enable the https://www.drupal.org/project/select2 module
Add select2 module like dependency in
entity_reference_views.info.ymlComment #7
vijaycs85Thanks for reporting. Since we are adding select2 based field plugins, added the module as a dependecy.