I have dozens of PHP error log entries like this, I'm pretty sure it's triggered on every page hit:

Unknown column 'hrids' in 'field list' query: SELECT hrids FROM menu_per_role WHERE mlid = 3596 in C:\web\htdocs\sites\all\modules\menu_per_role\menu_per_role.module on line 193.

Comments

AlexisWilke’s picture

Did you upgrade from Drupal 5.x? Did you run the update.php page?

The hrids column is new in D6...

      'hrids' => array(
        'description' => t('The role identifiers separated by commas. Hide from those roles.'),
        'type' => 'text',
        'not null' => TRUE,
      ),

Thank you.
Alexis

OLD ACCOUNT USE ID 169175 INSTEAD’s picture

No, I've always been running Drupal 6. When I run update.php it says "No updates available."

AlexisWilke’s picture

It was added in update 6001... so I guess that code did not work for you?!

Do you already have some menu per role data saved? If not, could you Uninstall (1. disable + 2. uninstall!), then try to reinstall?

/**
 * hook_update()
 */
function menu_per_role_update_6001() {
  $ret = array();

  // already using new schema?
  if (db_column_exists('menu_per_role', 'hrids')) {
    return $ret;
  }

  // create new field
  db_add_field($ret, 'menu_per_role', 'hrids', array(
    'description' => t('The role identifiers separated by commas. Hide from those roles.'),
    'type' => 'text',
    'not null' => TRUE,
    'default' => '',
  ));

  return $ret;
}
OLD ACCOUNT USE ID 169175 INSTEAD’s picture

I saved the settings for the secondary menu that was using this module and disabled/uninstalled. I just re-installed/enabled the module and it appears to be working fine no, no PHP errors in the log so far. Gonna keep an eye on it today, but I think it's fine now, thanks!

AlexisWilke’s picture

Status:Active» Fixed

I'm closing this one since you did not report another problem. I'm wondering why the table would not install the first time... who knows!

Thank you.
Alexis

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.