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.
Comments
Comment #1
nedjoThanks 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.
Comment #2
nedjoConsidering adding this patch as I'm getting several reports of this error on install.
Comment #3
bhosmer commentedI'll add another crash report here. I haven't had a chance to try out the patch yet though.
Comment #4
bhosmer commentedI'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).
Comment #5
nedjoWorking on this.
Comment #6
nedjoUnless 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 unsethook_views_default_views()implementations while in install mode, which could be determined by testing for one of the install.inc functions.Comment #7
bhosmer commentedThat 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/
Comment #8
nedjoPosted 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.
Comment #9
nedjoPatch from #1311828-28: Installation fails with SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database.media_type' doesn't exist appears to have fixed this issue.
Comment #10
bhosmer commentedThanks nedjo!
Comment #11.0
(not verified) commentedUpdate summary.