Project:The Next Generation Integration
Version:6.x-1.0-beta2
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active

Issue Summary

Development: WAMP(XP-2.2.9-5.0.51a-5.2.6)
Production: LAMP(Debian5.0-2.2.9-5.0.51-5.2.6)
TNG 7.03
Drupal 6.10

Issue:

When you first select TNG Permissions in the user settings screen tngintegrate creates the user in the tngintegrate table but fails to create the user in the tng_users table. Once this happens then no record will ever be created for the user because tngintegrate assumes from then on that the user exists in tng_users and all update queries fail also.

Problem:

TNG 7.x creates the tng_users table with no default values for any of the fields and flags some as NOT NULL. $adding1 query on line 328 of tngintegrate.module doesn't supply all values needed to create a successful INSERT.

Resolution:

Interim:

A short term solution to the problem is to execute a query similar to this against the tng_user table;

ALTER TABLE `drupal`.`tng_users` MODIFY COLUMN `allow_edit` TINYINT(4) NOT NULL DEFAULT 0,
MODIFY COLUMN `allow_add` TINYINT(4) NOT NULL DEFAULT 0,
MODIFY COLUMN `tentative_edit` TINYINT(4) NOT NULL DEFAULT 0,
MODIFY COLUMN `allow_delete` TINYINT(4) NOT NULL DEFAULT 0,
MODIFY COLUMN `allow_lds` TINYINT(4) NOT NULL DEFAULT 0,
MODIFY COLUMN `allow_ged` TINYINT(4) NOT NULL DEFAULT 0,
MODIFY COLUMN `allow_living` TINYINT(4) NOT NULL DEFAULT 0;

This will supply the values needed by tng_users.

Long Term:

The $adding1 query needs to be rewritten to supply required values. During the rewrite a routine should also be written to ensure the INSERT into tng_users succeeds. Might even consider setting up somewhere in the user interface a place to assign default values for these rights :)

nobody click here