- 🇬🇧United Kingdom Michelle-Buckby
Coming across the issue with the update hook:
`password_policy_update_8304`This is after updating from 3.0 to 4.0.0
At first with `drush updb` this update hook seems to hang , on a second attempt it fails and aborts:```
> [error] Update failed: password_policy_update_8304
[error] Update aborted by: password_policy_update_8304
[error] Finished performing updates.
```
We cannot lock to 3.1 as suggested because we need 4.0.0 as trying to upgrade a project to D10 - 🇨🇦Canada joseph.olstad
If my memory serves me correctly, a workaround to this issue is to uninstall the password_policy module, you may need to unwind some *.info.yml dependencies and rebuild caches to prevent other modules or custom modules from being uninstalled also. Once this module is uninstalled, install the 4.0.0+ password_policy.
You can test to see what happens by trying this drush command:
drush pmu password_policy;
If the only module that is proposed for uninstall is password_policy, this should make it easier.
Probably do this before upgrading the module.
Then in another step, upgrade the password_policy module and then install it/configure it.
- 🇬🇧United Kingdom Michelle-Buckby
Thank you for your reply, unfortunately trying to uninstall the module with drush seems to just hang.
This was after unwinding some of the *.info.yml to prevent dependencies from uninstalling first.Not able to give it another go at the moment but will try again at a later date..and try to get more info.
- 🇨🇦Canada joseph.olstad
@Michelle-Buckby, you're in luck, I've written a patch for this.
- last update
over 1 year ago Composer require failure - Status changed to Needs review
over 1 year ago 1:47am 30 July 2023 - 🇨🇦Canada joseph.olstad
I haven't tested this with mysql yet, however it works with Postgresql.
- last update
over 1 year ago 61 pass - last update
over 1 year ago 61 pass - last update
over 1 year ago 61 pass - 🇳🇿New Zealand amanp Poneke
I confirm that the patch in #12 works with Postgresql. Thanks
- 🇬🇧United Kingdom Michelle-Buckby
Thank you @joseph.olstad , just getting back here to say I've successfully updated Password Policy on two projects now, no further issues related to this.
- Status changed to RTBC
over 1 year ago 10:24pm 7 August 2023 - Assigned to joseph.olstad
- Status changed to Needs review
about 1 year ago 9:37pm 14 August 2023 - 🇨🇦Canada joseph.olstad
ok this is RTBC for Postgresql, however if someone with MariaDB or MySQL could please test to make sure this works in MySQL, that'd be great, with that said, I could synthesize a test to see myself , I'll write some synthetic test code to try this on mariadb/mysql and see if this is compatible.
- Status changed to Needs work
about 1 year ago 9:54pm 14 August 2023 - 🇨🇦Canada joseph.olstad
This patch works great with Postgresql, however it fails with MariaDB/MySQL as follows:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1 USING "password_policy_history" t2 WHERE t1.id < t2.id AND t1.pass_hash = ...' at line 1: DELETE FROM "password_policy_history" t1 USING "password_policy_history" t2 WHERE t1.id < t2.id AND t1.pass_hash = t2.pass_hash AND t1.timestamp = t2.timestamp; Array
I think this query should be rewritten.
- 🇨🇦Canada joseph.olstad
ok brute force fix for all Postgresql AND MariaDB/MySQL.
Delete ALL the history. Some might not like this but I'm guessing most will approve.
- Status changed to Needs review
about 1 year ago 10:10pm 14 August 2023 - Open on Drupal.org →Core: 10.0.7 + Environment: PHP 7.4 & MySQL 5.7last update
about 1 year ago Waiting for branch to pass - last update
about 1 year ago 61 pass - last update
about 1 year ago Composer require failure - last update
about 1 year ago Composer require failure - Issue was unassigned.
- last update
about 1 year ago 61 pass - last update
about 1 year ago 61 pass - last update
about 1 year ago 61 pass - 🇺🇸United States Kristen Pol Santa Cruz, CA, USA
Adding credit for work on duplicate issue:
🐛 sql server password_policy_update_8304 failed with error Closed: duplicate
- 🇺🇸United States Kristen Pol Santa Cruz, CA, USA
This should be against 4.0.x as 8.x branches are no longer supported, so changing version.
- Assigned to Kristen Pol
- 🇺🇸United States Kristen Pol Santa Cruz, CA, USA
Assigning to myself for review.
- 🇺🇸United States Kristen Pol Santa Cruz, CA, USA
Adding credit from duplicate issue:
🐛 Password policy update is failing for postgreSQL database while doing drush updb Closed: duplicate
- 🇺🇸United States Kristen Pol Santa Cruz, CA, USA
Updating the summary to provide more context.
- 🇺🇸United States Kristen Pol Santa Cruz, CA, USA
Minor wording change to summary.
-
Kristen Pol →
committed 1e6ca5d6 on 4.0.x authored by
joseph.olstad →
Issue #3313282 by joseph.olstad, Kristen Pol, Michelle-Buckby, amanp,...
-
Kristen Pol →
committed 1e6ca5d6 on 4.0.x authored by
joseph.olstad →
- Issue was unassigned.
- Status changed to Fixed
9 months ago 9:28pm 22 February 2024 - 🇺🇸United States Kristen Pol Santa Cruz, CA, USA
Thanks everyone for your work on this issue. I've merged the fix and included updated/more comments for more clarification on what happened.
Automatically closed - issue fixed for 2 weeks with no activity.
- 🇺🇸United States Kristen Pol Santa Cruz, CA, USA
Adding credit from ✨ Do not require user to re-run update 8301 to avoid error "user.field_pending_expire_sent field needs to be updated" Closed: duplicate .
- 🇺🇸United States Kristen Pol Santa Cruz, CA, USA
This is part of the new 4.0.1 release → .
- 🇨🇦Canada joseph.olstad
Thanks @Kristen Pol, definately the right call here, every system is supported.