The uc_roles module contains Views support, including a handler, uc_roles_handler_field_rid, to display the role name of a role that has been made a feature of a product. However, the current handler throws a db error when attempting to render:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'my_db.role' doesn't exist: SELECT r.role, r.name FROM {role} r WHERE r.role IN (:rids_0) ORDER BY r.name; Array ( [:rids_0] => my_rid ) in uc_roles_handler_field_rid->pre_render() (line 28 of /mysite/modules/contrib/ubercart/uc_roles/views/uc_roles_handler_field_rid.inc).
The problem is that the views handler is referring to the now-nonexistent roles table, because roles are now stored in config.
This can be easily fixed, though, by using the core user_roles() routine to get the role names.
The uc_roles module contains Views support, including a handler,
uc_roles_handler_field_rid
, to display the role name of a role that has been made a feature of a product. However, the current handler throws a db error when attempting to render:PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'my_db.role' doesn't exist: SELECT r.role, r.name FROM {role} r WHERE r.role IN (:rids_0) ORDER BY r.name; Array ( [:rids_0] => my_rid ) in uc_roles_handler_field_rid->pre_render() (line 28 of /mysite/modules/contrib/ubercart/uc_roles/views/uc_roles_handler_field_rid.inc).
The problem is that the views handler is referring to the now-nonexistent
roles
table, because roles are now stored in config.This can be easily fixed, though, by using the core
user_roles()
routine to get the role names.PR to follow.