Remove the hook implementation that unset password_policy_status key and add show_policy_table: false to the configuration of the default policy

Created on 11 January 2023, over 1 year ago
Updated 22 January 2023, over 1 year ago

Problem/Motivation

#2849271: Decouple display of policy table and policy validation β†’
Password policy β†’ module added the ability to hide the status table using the policy configuration in version 8.x-3.2 β†’ .

Varbase Security module hides the table by unsetting password_policy_status key which will be undefined when the show_policy_table key in policy configuration is false.

And therefore it throws the following:

Warning: Undefined array key "password_policy_status" in _password_policy_check_constraints()
TypeError: Drupal\Core\Render\MainContent\AjaxRenderer::renderResponse(): Argument #1 ($main_content) must be of type array, null given

Steps to reproduce

Given that I created a new user using the default password policy
When visiting recent log messages
Then I see one warning and one error logged

Proposed resolution

  • Remove the hook implementation that unset password_policy_status key and add show_policy_table: false to the configuration of the default policy.
  • Add a hook update to update the password_policy.password_policy.default_policy in active configs

Remaining tasks

  • βœ… File an issue about this project
  • βœ… Addition/Change/Update/Fix to this project
  • βœ… Testing to ensure no regression
  • βž– Automated unit/functional testing coverage
  • βž– Developer Documentation support on feature change/addition
  • βž– User Guide Documentation support on feature change/addition
  • βœ… Accessibility and Readability
  • βœ… Code review from 1 Varbase core team member
  • βœ… Full testing and approval
  • βœ… Credit contributors
  • βœ… Review with the product owner
  • βœ… Update Release Notes and Update Helper on new feature change/addition
  • βœ… Release varbase-9.0.11 β†’ , varbase_core-9.0.46 β†’

Varbase update type

  • βž– No Update
  • βž– Optional Update
  • βœ… Forced Update
  • βž– Forced Update if Unchanged

User interface changes

Edit password policy - before the fix
β†’

Edit Normal user account before the fix

Edit Normal user account after only composer update

Navigate to "/update.php" or run drush updb

Edit password policy - After the fix with composer update and drush updb

Edit Normal user account after the drush updb

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Issue #3332656 β†’ by RedwanJamous β†’ : Removed the hook implementation that unset password_policy_status key and add show_policy_table: false to the configuration of the default policy
πŸ› Bug report
Status

Fixed

Version

9.0

Component

Code

Created by

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.

Production build 0.69.0 2024