When I tried to enable the module I got this:

DatabaseSchemaObjectExistsException: Table tvi_settings already exists. in DatabaseSchema->createTable() (line 630 of /home/maus/www/drupal.test/includes/database/schema.inc).

I manually checked, there was no tvi_settings table before. But, despite the error, it was created.

CommentFileSizeAuthor
#4 fix_install-1151424-4.patch890 bytesmikeprinsloo

Comments

truongquangphuc’s picture

I have a same problem! :(

ollynevard’s picture

The reason you get the error is because Drupal tries to create the table twice.

The following lines in tvi.install are unnecessary as they are handled by core in Drupal 7:

Line 67 in tvi_install() function:

drupal_install_schema('tvi');

Line 92 in tvi_uninstall() function:

drupal_uninstall_schema('tvi');

If you comment them out the module installs successfully.

akamaus’s picture

Title: Error while enablbling tvi » Error while enabling tvi
Status: Active » Needs work

@nievo, I suspected it, thanks for clarifying. Should we create a patch?

mikeprinsloo’s picture

Status: Needs work » Needs review
StatusFileSize
new890 bytes

Here is a patch that removes the offending code.

summit’s picture

Subscribing, greetings, Martijn

jackbravo’s picture

Status: Needs review » Reviewed & tested by the community

Yes, works for me.

jackbravo’s picture

xandeadx’s picture

#4 works for me too.

nneka’s picture

This patch also worked for me. (#4)

kevinquillen’s picture

Status: Reviewed & tested by the community » Fixed

Just pushed this first change to dev before I saw this issue. Hope to resolve a handful more issues and create a new release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.