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_statuskey and addshow_policy_table: falseto the configuration of the default policy. - Add a hook update to update the
password_policy.password_policy.default_policyin 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_statuskey and addshow_policy_table: falseto the configuration of the default policy
Comments
Comment #2
redwan jamous commentedPatch provided. Update is needed to set
show_policy_tableto false.Comment #3
rajab natshahNice
They had the
show_policy_tableconfig settings committed and released then.Let us add a hook update to update the
password_policy.password_policy.default_policyin active configs for old projects.Comment #4
rajab natshahComment #5
rajab natshahComment #6
rajab natshahComment #10
rajab natshahComment #11
rajab natshahComment #12
rajab natshahComment #13
rajab natshahComment #14
rajab natshahComment #15
rajab natshahComment #16
rajab natshah✅ Released varbase_core-9.0.46
Comment #17
rajab natshah✅ Released varbase-9.0.11