Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
After upgrading to 7.x-2.0-alpha7 I get error
WD php: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'xyz.password_policy_expiration' doesn't exist: SELECT p.blocked AS blocked [error]
FROM
{password_policy_expiration} p
WHERE (uid = :db_condition_placeholder_0) ; Array
(
[:db_condition_placeholder_0] => 0
)
in password_policy_user_load() (line 236 of /var/www/drupalvm/xyz/sites/all/modules/contrib/password_policy/password_policy.module).
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'xyz.password_policy_expiration' doesn't exist: SELECT p.blocked AS blocked
FROM
{password_policy_expiration} p
WHERE (uid = :db_condition_placeholder_0) ; Array
(
[:db_condition_placeholder_0] => 0
)
in password_policy_user_load() (line 236 of /var/www/drupalvm/xyz/sites/all/modules/contrib/password_policy/password_policy.module).
Proposed resolution
I tried to fix the problem. I cloned the 7.x-2.x branch but found that the code in install file is completely different from 2.x alpha 7 release. Seems like after the release the code was reverted, but no new releases for the reverted code were made.
Remaining tasks
N/A
User interface changes
N/A
API changes
N/A
Data model changes
N/A
Comments
Comment #2
AohRveTPV CreditAttribution: AohRveTPV commentedHello. I suspect this error is due to upgrading from the 7.x-1.x branch to 7.x-2.x.
password_policy_expiration
is a table that exists in 7.x-1.x but not 7.x-2.x, so you would not be seeing that error unless the site previously had 7.x-1.x installed. Upgrading from 1.x to 2.x does not currently work: #2027019: Upgrade from 7.x-1.x to 7.x-2.x not possible. You'd need to uninstall 7.x-1.x then install 7.x-2.x.So, to rectify this, you could disable, uninstall, and remove 7.x-1.x, then install 7.x-2.0-alpha7.
I think you may have checked out another branch and not actually 7.x-2.x. I double-checked, and password_policy.install in 7.x-2.x-dev is almost the same as password_policy.install in 7.x-2.0-alpha7.
Comment #3
AohRveTPV CreditAttribution: AohRveTPV commentedIf you could, please report back whether doing what I suggested in #2 solves the problem.
Comment #4
AohRveTPV CreditAttribution: AohRveTPV commentedPlease re-open if you still have this problem. As previously explained, I suspect this is due to #2027019: Upgrade from 7.x-1.x to 7.x-2.x not possible.