Problem/Motivation

Fatal error when saving a user Symfony\Component\Validator\Exception\InvalidOptionsException: The option "caseSensitive" does not exist in constraint "Drupal\dbee\Plugin\Validation\Constraint\UserMailUniqueDbee". in Symfony\Component\Validator\Constraint->__get() (line 229 of /var/www/html/vendor/symfony/validator/Constraint.php).

Steps to reproduce

Go to edit any user and click save button.

Proposed resolution

Define caseSensitive property for UserMailUniqueDbee constraint

Issue fork dbee-3548669

Command icon 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

cmd87 created an issue. See original summary.

thedut’s picture

Hello,

I can not reproduce this Fatal error on Drupal 11.2.3.
Witch version are you using ?

cmd87’s picture

We are on 10.3.6 currently

thedut’s picture

Tested on Drupal 11.2.3 and on 10.3.14, it works :
UserMailUniqueDbee extends UserMailUnique that extends UniqueFieldConstraint, [for the records, that extends SymfonyConstraint]
UserMailUniqueDbee does inherit public $caseSensitive = FALSE; from UniqueFieldConstraint class.

I'm going to check on Drupal 10.3.6.

thedut’s picture

Assigned: Unassigned » thedut
Status: Active » Closed (cannot reproduce)

Tested on Drupal 10.3.6 :

  • From UI : I still can't reproduce this issue editing a user
  • From Code : still defined the same way as tested version above.

Did you alter the user ou dbee modules in any way ?
Seems that there is no issue from fresh install.
I set this issue as "Can not reproduce", Feel free to reopen it with more informations.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

thedut’s picture

Status: Closed (cannot reproduce) » Active

Hum, Yes I tried with lastest version of the dbee module and this time : yes, Fatal error on editing the user : I reopen this issue.

thedut’s picture

Status: Active » Closed (cannot reproduce)

I close this issue again, sorry. I met an fatal error not due the UserMailUniqueDbee class but because i didn't refresh my install.
And tested on Drupal 10.5.3 to (the latest D10 stable release).
Still :
Did you alter the user ou dbee modules in any way ?
Seems that there is no issue from fresh install.
I set this issue as "Can not reproduce", Feel free to reopen it with more informations.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

cmd87’s picture

Status: Closed (cannot reproduce) » Active

Did you alter the user ou dbee modules in any way ?

No, nothing like that.

Seems that there is no issue from fresh install.

That I can't confirm. Didn't have time to test on fresh install.

I can confirm next:

UserMailUniqueDbee extends UserMailUnique that extends UniqueFieldConstraint, [for the records, that extends SymfonyConstraint]

Here is you can see that caseSensitive doesn't exist in 10.3.6

https://git.drupalcode.org/project/drupal/-/blob/10.3.6/core/lib/Drupal/...

The caseSensitive property was added since 10.3.9

https://git.drupalcode.org/project/drupal/-/blob/10.3.9/core/lib/Drupal/...

  • thedut committed 1e4f80a9 on 3.x
    Issue #3548669 by cmd87 : The option caseSensitive does not exist in...
thedut’s picture

Status: Active » Fixed

Yes you right ! Finally I was able to reproduce your issue on Drupal 10.3.6.
I guess I was not on the right Drupal version the first time I have tried.
Commited, this bug will be fix in the next release : 3.1.0-rc3
Thank you for reporting this issue and its fix.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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