Problem/Motivation
When creating a new user the critical error happens.
Error backtrace:
Error: Typed property Drupal\Core\Validation\Plugin\Validation\Constraint\UniqueFieldValueValidator::$entityFieldManager must not be accessed before initialization in Drupal\Core\Validation\Plugin\Validation\Constraint\UniqueFieldValueValidator->validate() (line 54 of core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/UniqueFieldValueValidator.php).
Drupal\sharedemail\Plugin\Validation\Constraint\SharedEmailUniqueValidator->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: 275)
Drupal\Core\Form\FormValidator->doValidateForm() (Line: 118)
Drupal\Core\Form\FormValidator->validateForm() (Line: 593)
Drupal\Core\Form\FormBuilder->processForm() (Line: 325)
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: 627)
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: 58)
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: 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: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 3420685-user-create-error-6.patch | 2.58 KB | vadym.tseiko |
Issue fork sharedemail-3420685
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
dench0Comment #4
baikho commentedThanks for raising this. It seems the parent Validator class in Core introduced these changes in 10.2.x via #2478663: UniqueFieldValueValidator works only with single value fields causing the breakage.
Comment #5
baikho commentedThe fix is failing on 10.1.x, so moving back to Needs work.
If we can't ensure compatibility for both 10.1.x and 10.2.x, then we may need to introduce a new release with updated version constraints or so.
Comment #6
vadym.tseiko commentedI added patch made from MR. Fix works for me - Drupal 10.2.6
Comment #7
marcob77 commentedI have same error on 3.0.0 and applied the patch.have no more error but now the system doesn't accept registration of a new user with same email address.
Tested again, was my fault. All seems to be ok.
Drupal version 10.2.7
Comment #8
finneThe fork diff (saved as local patch) works fine for me on D10.3.
As D10.1 was EOL over 1 year ago, I think we might fix this issue for current D10 users, and report a BC break if you are still on 10.1.
Comment #9
smulvih2Tested #6 on D10.2.x and it fixes the issue for me.
Comment #10
kumkum29 commentedHello,
same problem on my site, I get a strange behavior : I get the error when I want to add media entity. With the patch, It's ok now !!
Do you think include the patch in the dev version ?
Thanks !
Drupal 10.3
Comment #13
baikho commented