Admin > Configuration > People > Password Policy > List > + Add
results in
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'config' in 'field list': INSERT INTO {password_policy} (name, config) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1); Array ( [:db_insert_placeholder_0] => Similar to Onyen [:db_insert_placeholder_1] => a:10:{s:10:"char_count";a:1:{s:10:"char_count";s:1:"1";}s:9:"int_count";a:1:{s:9:"int_count";s:1:"1";}s:8:"username";a:1:{s:7:"enabled";b:0;}s:12:"symbol_count";a:2:{s:12:"symbol_count";s:1:"1";s:20:"symbol_count_symbols";s:7:"!@#$%&*";}s:14:"past_passwords";a:1:{s:14:"past_passwords";s:0:"";}s:11:"alpha_count";a:1:{s:11:"alpha_count";s:1:"1";}s:10:"alpha_case";a:1:{s:10:"alpha_case";i:1;}s:11:"consecutive";a:1:{s:22:"consecutive_char_count";s:0:"";}s:4:"role";a:1:{s:5:"roles";a:23:{i:9;s:1:"9";i:5;s:1:"5";i:22;s:2:"22";i:18;s:2:"18";i:20;s:2:"20";i:19;s:2:"19";i:21;s:2:"21";i:8;s:1:"8";i:16;s:2:"16";i:17;s:2:"17";i:23;s:2:"23";i:24;s:2:"24";i:7;s:1:"7";i:13;s:2:"13";i:14;s:2:"14";i:15;s:2:"15";i:6;s:1:"6";i:10;s:2:"10";i:11;s:2:"11";i:12;s:2:"12";i:2;i:0;i:3;i:0;i:4;i:0;}}s:6:"expire";a:5:{s:12:"expire_limit";s:7:"90 days";s:22:"expire_warning_message";s:46:"Your Password has expired please change it now";s:25:"expire_warning_email_sent";s:28:"-14 days, -7 days, -24 hours";s:28:"expire_warning_email_message";s:0:"";s:28:"expire_warning_email_subject";s:92:"[user:name] you password on [site:name] shall expire in [password_expiration_date:interval] ";}} ) in drupal_write_record() (line 7136 of /var/www/html/aric/includes/common.inc).

CommentFileSizeAuthor
#3 Print view - phpMyAdmin 4.0.pdf58.27 KBAnonymous (not verified)

Comments

erikwebb’s picture

Status: Active » Postponed (maintainer needs more info)

Could you provide the table description of your password_policy table?

DESCRIBE password_policy\G

hefox’s picture

I got this also, I think when going from 1.x to 2.x

edit: fixed it by reinstalling

Anonymous’s picture

StatusFileSize
new58.27 KB

I'm having the same issue

here's the table description you've requested (attachment)

Anonymous’s picture

ah.. i've also updated from 1.x to 2.x

  • There are no update hooks that alter the DB schema and / or DB table
  • There is no uninstall hook that removes the table, so uninstalling shouldn't fix the problem either
Anonymous’s picture

Category: Bug report » Feature request

i wrote an update hook which solved it for me..

/**
 * Alters the 1.x table to the 2.x scheme.
 */
function password_policy_update_7200() {
  db_change_field('password_policy', 'name', 'name', array(
    'type' => 'varchar',
    'length' => '255',
    'not null' => TRUE,
    'default' => '',
    'description' => 'Unique ID for a Password Policy.',
  ));
  db_change_field('password_policy', 'description', 'config', array(
    'type' => 'text',
    'not null' => FALSE,
    'description' => 'Configuration for Password Policy',
  ));


  $field_names = array('pid', 'enabled', 'policy', 'created', 'expiration', 'warning', 'weight');
  foreach ($field_names as $field_name) {
    db_drop_field('password_policy', $field_name);
  }
}

I can drop the field because i've got a clean install an thus no content yet. But i'll assume the code above should move the content to the appropriate place.

aohrvetpv’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)