After upgrading Drupal 7 core to 7.56, the following error message displays when we edit our current password policy. We were able to update the password policy before but not anymore. It is completely block us from editing now.

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'constraints' in 'field list':

The line number generating error is coming from is

password_policy_save_policy() (line 1441 of sites/all/modules/contrib/password_policy/password_policy.module)

Comments

drupi17 created an issue. See original summary.

AohRveTPV’s picture

Hello. Could you please check the schema version for Password Policy as follows and report back?

mysql> SELECT schema_version FROM system WHERE name='password_policy';
+----------------+
| schema_version |
+----------------+
|           7108 |
+----------------+
1 row in set (0.00 sec)

I can provide a PHP snippet to do it if you don't have direct database access.

AohRveTPV’s picture

This may be the same as #2876691: Undefined index: contraints error. I hope you will report back the schema version so I can try to get to the bottom of it.

drup16’s picture

@AohRveTPV,

That did the trick. It was missing the hook updates which have now been applied and I am getting 7108. Thank you.

AohRveTPV’s picture

Status: Active » Closed (works as designed)

Ah, so in this case maybe the problem was just not having yet run the database updates. Glad it's working for you now.