On a test site using D7-beta1 (not yet b2...), when I try to install and enable this module for the first time, I get this error when enabling it:
"DatabaseSchemaObjectExistsException: Table <em class="placeholder">autologout</em> already exists. in DatabaseSchema->createTable() (line 621 of /.../includes/database/schema.inc).
The website encountered an unexpected error. Please try again later. "
This module has never been used on this site before, so that table probably does not exist before activating this module.
Subsequently, I get 2 instances of the following error an all pages:
" * Notice: Undefined index: authenticated user in _autologout_by_role() (line 527 of /.../sites/all/modules/autologout/autologout.module). "
The module does not work in this state, just had to disable it.
Comments
Comment #1
akoepke commentedThe .install file needs to be edited so it doesn't call the autologout_schema function. D7 calls this function by default so by calling it during the install phase it is actually trying to create the table in twice.
Comment #2
Seph commentedI just got the same error after enabling the module in D7.2 What exactly needs to be edited to correct this? New to coding and still learning.
DatabaseSchemaObjectExistsException: Table autologout already exists. in DatabaseSchema->createTable() (line 629 of .../includes/database/schema.inc).
Comment #3
akoepke commentedThere is a file called autologout.install, line 15 is below
Remove that line as it is not needed with Drupal 7.
Comment #4
acbramley commentedA patch for this should be committed to 2.x as this is a "critical" bug with an easy fix. Here's a patch that removes the incorrect function calls.
Comment #5
jrglasgow commentedthat patch in #4 has been committed