Class "EmailValidator\EmailValidator" not found

Created on 27 August 2024, 3 months ago
Updated 9 September 2024, 3 months ago

Problem/Motivation

Hi, I seem to be getting this error when using this module. Any insights or help would be appreciated.

Additional Info:
This error occurs when I've checked the following:
Validate user account mail field on:
- Registration and Email change

I've also checked - Ensure user account email domains are:
- Valid (uses an MX lookup)
- Not a disposable email provider like mailinator.com
- Not in your custom list of banned email providers

Error: Class "EmailValidator\EmailValidator" not found in Drupal\advanced_email_validation\AdvancedEmailValidator->validate() (line 50 of modules/contrib/advanced_email_validation/src/AdvancedEmailValidator.php).
Drupal\advanced_email_validation\Plugin\Validation\Constraint\AEVNewEmailValidator->validate() (Line: 202)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateConstraints() (Line: 154)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode() (Line: 164)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode() (Line: 106)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validate() (Line: 93)
Drupal\Core\TypedData\Validation\RecursiveValidator->validate() (Line: 132)
Drupal\Core\TypedData\TypedData->validate() (Line: 518)
Drupal\Core\Entity\ContentEntityBase->validate() (Line: 188)
Drupal\Core\Entity\ContentEntityForm->validateForm()
call_user_func_array() (Line: 82)
Drupal\Core\Form\FormValidator->executeValidateHandlers() (Line: 274)
Drupal\Core\Form\FormValidator->doValidateForm() (Line: 118)
Drupal\Core\Form\FormValidator->validateForm() (Line: 593)
Drupal\Core\Form\FormBuilder->processForm() (Line: 326)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 57)
Drupal\advban\AdvbanMiddleware->handle() (Line: 50)
Drupal\ban\BanMiddleware->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)
πŸ’¬ Support request
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States rex.barkdoll

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

Comments & Activities

  • Issue created by @rex.barkdoll
  • πŸ‡ΊπŸ‡ΈUnited States rex.barkdoll
  • πŸ‡¦πŸ‡ΊAustralia darvanen Sydney, Australia

    @rex.barkdoll that class is from the third-party library, did you install the module using composer? The library should have been automatically imported with it.

  • πŸ‡ΊπŸ‡ΈUnited States rex.barkdoll

    Thanks for your response.
    Yes, I installed with Composer. I can try reinstalling again to see if that works.

  • πŸ‡ΊπŸ‡ΈUnited States rex.barkdoll

    Ok, so reinstalling worked. Not sure what happened on the initial install.

    That said, I'm now receiving other errors:

    
    Deprecated function: explode(): Passing null to parameter #2 ($string) of type string is deprecated in _unwanted_email_registration_filter_email() (line 61 of modules/contrib/unwanted_email_registration/unwanted_email_registration.module).
    _unwanted_email_registration_filter_email(NULL) (Line: 57)
    Drupal\unwanted_email_registration\UnwantedEmailRegistrationService->validateEmail('testemail@gmail.com') (Line: 44)
    _unwanted_email_registration_form_validate(Array, Object)
    call_user_func_array('_unwanted_email_registration_form_validate', Array) (Line: 82)
    Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 274)
    Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'user_register_form') (Line: 118)
    Drupal\Core\Form\FormValidator->validateForm('user_register_form', Array, Object) (Line: 593)
    Drupal\Core\Form\FormBuilder->processForm('user_register_form', Array, Object) (Line: 326)
    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: 638)
    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: 181)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
    Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
    Drupal\big_pipe\StackMiddleware\ContentLength->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: 36)
    Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 741)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
    
    Error message
    Warning: Undefined array key 1 in _unwanted_email_registration_filter_email() (line 63 of modules/contrib/unwanted_email_registration/unwanted_email_registration.module).
    _unwanted_email_registration_filter_email('') (Line: 57)
    Drupal\unwanted_email_registration\UnwantedEmailRegistrationService->validateEmail('testemail@gmail.com') (Line: 44)
    _unwanted_email_registration_form_validate(Array, Object)
    call_user_func_array('_unwanted_email_registration_form_validate', Array) (Line: 82)
    Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 274)
    Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'user_register_form') (Line: 118)
    Drupal\Core\Form\FormValidator->validateForm('user_register_form', Array, Object) (Line: 593)
    Drupal\Core\Form\FormBuilder->processForm('user_register_form', Array, Object) (Line: 326)
    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: 638)
    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: 181)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
    Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
    Drupal\big_pipe\StackMiddleware\ContentLength->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: 36)
    Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 741)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
    
    
    
  • πŸ‡¦πŸ‡ΊAustralia darvanen Sydney, Australia

    @rex.barkdoll that appears to be a problem with unwanted_email_registration rather than this email.

    I suggest opening an issue for that module :)

    I'll leave this issue open for a little while in case you come across something else that affects this module you would like help with.

  • πŸ‡ΊπŸ‡ΈUnited States rex.barkdoll

    Whoops, sorry about that. I guess I wasn't reading closely enough.

  • Status changed to Fixed 3 months ago
  • πŸ‡¦πŸ‡ΊAustralia darvanen Sydney, Australia

    No worries mate, hope you got it sorted out :)

    Feel free to reopen if you need more help, or a fresh ticket if you find something substantially different.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024