The automatic login is not working, I presume because this SQL failed:

mysql> INSERT INTO interceptor_instances (id, name, interceptor_namespace) VALUES (1, 'DrupalInterceptor', 'drupal.drupal.interceptor');
ERROR 1062 (23000): Duplicate entry '1' for key 'PRIMARY'

I get the KT login page in the iframe, with empty username/password.

Everything else about your module looks very promising, so I'm hoping there is a fix for my SQL issue! I'm not so familiar with KT or SQL, so don't know where to look for diags, except kt/var/log/kt*.www-data.log.txt and kt*.root.log.txt. Both of these are zero-length files. Any help at all is greatly appreciated.

Comments

terra666’s picture

Interestingly, logging out of KT also logs me out of drupal.

thepanz’s picture

the SQL error is due to a duplicate ID in the table!
Try this instead

INSERT INTO interceptor_instances (name, interceptor_namespace) VALUES ('DrupalInterceptor', 'drupal.drupal.interceptor');

I've edited the KT interceptor to automatically add the entry, I'll post my edits soon into 2.x-dev branch! :)

thepanz’s picture

Please refer to #963092: Rewritten DrupalPlugin and DrupalInterceptor for KT for new source code with auto "interceptor_instance" SQL execution.

terra666’s picture

Thank you for the quick response! I get no SQL error, but I still get the KT login page in the iframe, with empty username/password. The password reset is the only other entry in the SQL table, so I thought it may be having an effect on the drupal interceptor. I tried a few combinations with the following results.

1st attempt: with your new sql command, without the ID, gives this table:

SELECT * from interceptor_instances;
+----+----------------------------+----------------------------------+--------+
| id | name                       | interceptor_namespace            | config |
+----+----------------------------+----------------------------------+--------+
|  1 | Password Reset Interceptor | password.reset.login.interceptor |        |
|  2 | Password Reset Interceptor | password.reset.login.interceptor |        |
|  3 | Password Reset Interceptor | password.reset.login.interceptor |        |
|  4 | DrupalInterceptor          | drupal.drupal.interceptor        | NULL   |
+----+----------------------------+----------------------------------+--------+

This resulted in the same old problem: KT login page in the iframe, with empty username/password.
Note that enabling the Password Reset Plugin results in three new entries for some reason, while disabling it results in two new entries. Enabling/disabling continues to add entries. I assume the extra entries are ignored and cause no ill effects.

2nd attempt: removed duplicates, so with this table:

SELECT * from interceptor_instances;
+----+----------------------------+----------------------------------+--------+
| id | name                       | interceptor_namespace            | config |
+----+----------------------------+----------------------------------+--------+
|  1 | Password Reset Interceptor | password.reset.login.interceptor |        |
|  2 | DrupalInterceptor          | drupal.drupal.interceptor        | NULL   |
+----+----------------------------+----------------------------------+--------+

This resulted in the same login behavior as 1st attempt.

3rd attempt: reversed the order of the entries in the above table, so with this table:

SELECT * from interceptor_instances;
+----+----------------------------+----------------------------------+--------+
| id | name                       | interceptor_namespace            | config |
+----+----------------------------+----------------------------------+--------+
|  1 | DrupalInterceptor          | drupal.drupal.interceptor        | NULL   |
|  2 | Password Reset Interceptor | password.reset.login.interceptor |        |
+----+----------------------------+----------------------------------+--------+

This resulted in just the iframe title (KnowledgeTree) displayed with a short "Loading Document Manager, then a blank iframe.

There must be something else going on. Do you have any suggestions for debugging?

thanks!
Teresa

terra666’s picture

And on a 4th attempt with the password reset plugin disabled, and this table:

SELECT * from interceptor_instances;
+----+-------------------+---------------------------+--------+
| id | name              | interceptor_namespace     | config |
+----+-------------------+---------------------------+--------+
|  1 | DrupalInterceptor | drupal.drupal.interceptor | NULL   |
+----+-------------------+---------------------------+--------+

This resulted in the same login behavior as 3rd attempt.

thepanz’s picture

Please try the new code (refer the my linked issue with my patch/code): I've added some debug features (enable them in the config.ini file, section [drupal] as commented).
Using the debug data you can figure out the drupal/KT login process :)

Let me know

note: read the KT plugin and Interceptor source code for a complete cleanup for KT to avoid conflicts and install issues.

thepanz’s picture

Please read the new 2.x install documentation, it's (I think) much more clear
http://drupalcode.org/viewvc/drupal/contributions/modules/kt/INSTALL.txt...

Comments are welcome!