Can't 'cancel the pending change', php error

Created on 20 June 2021, over 3 years ago
Updated 23 December 2023, 12 months ago

Problem/Motivation

The email_confirmer_users sub-module, gives the user the opportunity to 'cancel the pending change' after changing the email and saving their profile.

After clicking on that link, the user sees: The website encountered an unexpected error. Please try again later.

TypeError: Argument 1 passed to Drupal\Core\Entity\ContentEntityForm::__construct() must implement interface Drupal\Core\Entity\EntityRepositoryInterface, instance of Drupal\Core\Entity\EntityTypeManager given, called in /var/www/html.original/modules/contrib/email_confirmer/email_confirmer_user/src/Form/UserEmailChangeCancelForm.php on line 48 in Drupal\Core\Entity\ContentEntityForm->__construct() (line 56 of /var/www/html.original/core/lib/Drupal/Core/Entity/ContentEntityForm.php)

Steps to reproduce

  1. Install both email_confirmer and email_confirmer_users
  2. Login with your profile
  3. Change your email address
  4. Save
  5. Go again to the edit profile page and under the email textfield, click on 'cancel the pending change'

Proposed resolution

Going to provide a patch shortly.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡·Argentina neschi

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Status changed to Fixed over 1 year ago
  • πŸ‡ͺπŸ‡ΈSpain manuel.adan 🌌

    Clear bug. Manually tested on D8, D9 and D10. Thanks!

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

  • Status changed to Fixed about 1 year ago
  • πŸ‡¦πŸ‡·Argentina neschi

    Hi, I am wondering why I don't see credit for this issue in my profile if I created the issue and committed the fix? Did I miss anything? Thank you.

  • πŸ‡ΊπŸ‡ΈUnited States John Franklin

    The boring technical reason is that the commit message only mentions me. The root cause is @manuel.adan probably didn't notice the patch I posted was just your patch posted to make more obvious to others, or maybe he has some automated process. You should have gotten top billing on the commit.

    Editing the commit isn't feasible, but we could add another patch to the README with a commit message that mentions you and even the hash of the commit for this issue. Something like "Issue #3219736 by neschi: Credit where credit is due for f5b91ade."

Production build 0.71.5 2024