Problem/Motivation

When the Debut Forum feature (disabled by default) is selected for install, Open Outreach install fails with the message: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mydatabase.media_type' .

Proposed resolution

Temporary workaround is: don't select Debut Forum for installation.

There is a patch available at #1311828: Installation fails with SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database.media_type' doesn't exist that reportedly addresses this error. But it seems like the wrong place to intervene.

The core patch at #1311820: Don't do a registry_update() before installing a module attempts to diagnose and address the underlying issue.

Unless and until there's any progress on the core patch, a possible approach in Open Outreach is to use hook_module_implements_alter() to unset hook_views_default_views() implementations while in install mode, which could be determined by testing for one of the install.inc functions.

Remaining tasks

User interface changes

API changes

Comments

nedjo’s picture

Thanks for the note. Since I can't reproduce this issue, and the patch is not yet ready to be committed, I don't think I'll add it to openoutreach, but it's useful to others to have this link in case media is failing to install for them.

nedjo’s picture

Title: patch enabled error free install » Openoutreach install fails with error message SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mydatabase.media_type'

Considering adding this patch as I'm getting several reports of this error on install.

bhosmer’s picture

I'll add another crash report here. I haven't had a chance to try out the patch yet though.

bhosmer’s picture

I'll echo another install failure. I haven't had a chance to try the patch though.

Notice: Undefined index: silver_bells in advanced_forum_style_lineage() (line 70 of /Applications/MAMP/htdocs/nedjo-openoutreach-05331c0/profiles/openoutreach/modules/contrib/advanced_forum/includes/style.inc).
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'openoutreach.media_type' doesn't exist: SELECT mt.* FROM {media_type} mt ORDER BY weight ASC; Array ( ) in media_type_get_types() (line 122 of /Applications/MAMP/htdocs/nedjo-openoutreach-05331c0/profiles/openoutreach/modules/contrib/media/includes/media.types.inc).

nedjo’s picture

Assigned: Unassigned » nedjo

Working on this.

nedjo’s picture

Unless and until there's any progress on the core patch at #1311820: Don't do a registry_update() before installing a module, I'm thinking of using hook_module_implements_alter() to unset hook_views_default_views() implementations while in install mode, which could be determined by testing for one of the install.inc functions.

bhosmer’s picture

That sounds good. Thanks for looking into this so quickly. This distribution is being used for our Coding for a Cause at this year's Florida Drupal Camp: http://fldrupalcamp.org/

nedjo’s picture

Posted a patch to #1311828-28: Installation fails with SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database.media_type' doesn't exist and added it to debut_media. Testing to see if that's fixed this error.

nedjo’s picture

bhosmer’s picture

Thanks nedjo!

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Update summary.