Active
Project:
DataBase Email Encryption
Version:
3.1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
10 Dec 2025 at 13:55 UTC
Updated:
23 Dec 2025 at 02:07 UTC
Jump to comment: Most recent
Updating DBEE from 3.0.0 to 3.1.0 gives me the following error when trying to add a user:
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "UserMailUniqueDbee" plugin does not exist. Valid plugin IDs for Drupal\Core\Validation\ConstraintManager are: Callback, Blank, NotBlank, Email, Country, AddressFormat, BlockContentEntityChanged, DateTimeFormat, FileValidation, FileUriUnique, LinkAccess, LinkExternalProtocols, LinkType, LinkNotExistingInternal, oembed_resource, MenuTreeHierarchy, MenuSettings, PathAlias, RedirectSourceLinkType, TaxonomyHierarchy, UserMailUnique, UserName, UserMailRequired, ProtectedUserField, UserNameUnique, ValidPath, UniquePathAlias, Range, UniqueField, NotNull, Regex, ComplexData, AllowedValues, Length, Uuid, Count, PrimitiveType, Null, EntityHasField, EntityChanged, Bundle, EntityType, EntityUntranslatableFields, ValidReference, ReferenceAccess in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
Drupal\Core\Plugin\DefaultPluginManager->getDefinition('UserMailUniqueDbee') (Line: 21)
Drupal\Core\Validation\ConstraintFactory->createInstance('UserMailUniqueDbee', Array) (Line: 83)
Drupal\Component\Plugin\PluginManagerBase->createInstance('UserMailUniqueDbee', Array) (Line: 79)
Drupal\Core\Validation\ConstraintManager->create('UserMailUniqueDbee', Array) (Line: 123)
Drupal\Core\TypedData\TypedData->getConstraints() (Line: 262)
Drupal\Core\Field\FieldItemList->getConstraints() (Line: 45)
Drupal\Core\TypedData\Validation\TypedDataMetadata->getConstraints() (Line: 38)
Drupal\Core\TypedData\Validation\TypedDataMetadata->findConstraints('Default') (Line: 151)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object) (Line: 163)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object, Array, 1) (Line: 105)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validate(Object, NULL, NULL) (Line: 93)
Drupal\Core\TypedData\Validation\RecursiveValidator->validate(Object) (Line: 132)
Drupal\Core\TypedData\TypedData->validate() (Line: 489)
Drupal\Core\Entity\ContentEntityBase->validate() (Line: 188)
Drupal\Core\Entity\ContentEntityForm->validateForm(Array, Object)
call_user_func_array(Array, Array) (Line: 82)
Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 275)
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: 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: 263)
Drupal\shield\ShieldMiddleware->bypass(Object, 1, 1) (Line: 130)
Drupal\shield\ShieldMiddleware->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: 49)
Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)Reverting to DBEE 3.0.0 gives no issue and the user is created.
Drupal 9.5.11, Encrypt 8.x-3.2, Real AES 8.x-2.6
Comments
Comment #2
philyComment #3
thedut commentedHello Phily,
Yes you are right, the dbee v3.1.0 is not compatible with Drupal 9 : I should change the dependancy module of the dbee v3.1 releases, or make it compatible with D9 (which is not supported anymore by the drupal team).
Actually you should stay on dbee v.3.0
In order to fix this issue I need to determine the exact Drupal version the Drupal\user\Plugin\Validation\Constraint\UserMailUnique appears.
I can't find the exact release tag, maybe arround Drupal core v10.3 ?
any idea ?
Comment #4
elc commentedThe constraint was added back in Drupal 8, so that's not the issue.
I originally found all the details in #3461469: Core UserMailUnique constraint fails with DBEE encrypted users, with the commit to Drupal Core being https://git.drupalcode.org/project/drupal/-/commit/fe0fd73a2fb6aee76dc14...
The issue here is that Drupal 9 doesn't know about Attributes instead of Annotations, which for the Constraint Attribute was in Drupal 10.3.0. UserMailUniqueDbee was added using Attribute, so D9 can't discover it and hence the not found error.
@see CR: Plugins converted from Annotations to Attributes in 10.3.0.
D9 is out of support, but the UserMailUniqueDbee Constraint could be ported back to 3.0.x using Annotations maybe?
Comment #5
thedut commentedThank you elc,
the Drupal\user\Plugin\Validation\Constraint\UserMailUnique appears from Drupal Core v10.0.0
So, actually, the dbee v3.1.0 core_version_requirement is not >= 9 but >= 10.
Comment #7
thedut commentedfixed into the dbee v3.1.1 release.
For Drupal 9 : you should stay on the v3.0.0 release.
Comment #9
thedut commentedI have created a new issue for porting to D9 the recents dbee changes.
I will maybe release v3.0.1 with the elc idea.
But There are maybe more necessary adapations.
Comment #10
elc commentedThe 3.1.x branch being set to >=10 means it will hit the same error for all versions before Drupal Core 10.3.0 - this is due to the CR I linked related to the conversion of Constraints to Attributes (with a Annotation backup until Drupal 12). Drupal 10.2.x has no idea how to discover plugins using attributes.
3.1.x branch should really be restricted to >=10.3. I'd normally only do ^10.3 || ^11 since we know it is compatible with those versions, and are yet to know if it's compatible with 12, however ">=10" states that it works with 12, 13, 14 etc.
Comment #11
thedut commentedHum, you right, I re-open this issue.