Problem/Motivation

When creating a new user restriction, after clicking on Create new user restriction, I get a WSOD.

The log shows the following error message.

TypeError: Cannot assign array to property Drupal\user_restrictions\Entity\UserRestriction::$expiration of type int in Drupal\Core\Config\Entity\ConfigEntityBase->set() (line 173 of /var/www/drupal/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php).

I got this error before the a5d334489357a96040f9178145823bc308f33f10 commit; right after it, I did no got that error, but I now get it again, on the live previews.

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

avpaderno created an issue. See original summary.

avpaderno’s picture

Let's try a different approach. Using the validation handler to change the value associated to the form element seem not to work on Drupal 11.2, and really it is a hack.

avpaderno’s picture

Status: Active » Needs review

avpaderno changed the visibility of the branch 3552059-fix-exception to hidden.

  • avpaderno committed 2833828f on 3.0.x
    Issue #3552059: TypeError: Cannot assign array to property Drupal\...
avpaderno’s picture

Issue summary: View changes
avpaderno’s picture

Version: 3.0.x-dev » 2.1.x-dev

  • avpaderno committed 5257230e on 2.1.x
    Issue #3552059: TypeError: Cannot assign array to property Drupal\...
avpaderno’s picture

Status: Needs review » Fixed

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.