I recently started working with services again after a few weeks and several core and module updates, and now I am getting errors such as the following:

user warning: Table '[database_name].services_key_permissions' doesn't exist query: INSERT INTO services_key_permissions (kid, method) VALUES ('[hash]', 'menu.get') in /var/www/html/drupal/sites/all/modules/services/auth/services_keyauth/services_keyauth.admin.inc on line 128.

Any suggestions on how to get this table into the db? I've got the latest dev revision, and I've check the status report and tried updating, but drupal thinks everything is up to date.

TIA for any help,
Derek

Comments

marcingy’s picture

Have you tried running update.phpa s the table is provided in the orginal definition and as update so I can't see why it wouldn't exist if updates have been run.

marcingy’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)
dereks’s picture

Yes, I've tried to update 3-4 times. It doesn't think there are any updates to install. It looks like the services module is at 6002 and services_keyauth module is at 6004. Is that as it should be?

jahwe2000’s picture

this happens, if you have updated from a too old version (like I did)

use this sql to fix it: (replace the drupal_ from the table name with your table prefix)

CREATE TABLE `drupal_services_key_permissions` (
`kid` char(32) NOT NULL,
`method` varchar(255) NOT NULL,
PRIMARY KEY (`kid`,`method`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

dereks’s picture

That seems to have done the trick - thanks!

Derek

marcingy’s picture

Status: Postponed (maintainer needs more info) » Fixed

The update path has been tweaked to take into account new installs and service upgrades that need the new table. This patch has been applied to dev.

marcingy’s picture

Status: Fixed » Closed (fixed)