When the modules uuid_features and current_search (a contrib of the Facet API module) are both activated, I receive the following error, when I attempt to re-create any feature:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'd7db.block_current_search' doesn't exist: SELECT b.delta AS delta, b.searcher AS searcher FROM {block_current_search} b; Array ( ) in uuid_current_search_configuration_features_export_options() (line 16 of /var/www/html/sites/all/modules/contrib/uuid_features/includes/uuid_current_search_configuration.features.inc).
The website encountered an unexpected error. Please try again later.
The table block_current_search doesn't appear to exist or be created by the current_search (or any) module.
I've been able to keep working by removing the SQL call made at the line 16 listed above, but I don't believe this is an adequate solution. The options this module is looking to export thru this call may exist somewhere else. It's also possible this should be cross-posted to the Facet API issue queue.
I have been able to verify this with UUID Features 7.x-1.x-dev, as well as 7.x-1.5 and 7.x-1.x-dev of Facet API.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 2966601-prevent_current_search_crash-5.patch | 1.12 KB | jmdeleon |
| #3 | 2966601-prevent_current_search_crash-3.patch | 772 bytes | jmdeleon |
Comments
Comment #2
jmdeleon commentedComment #3
jmdeleon commentedRolled a patch for this issue.
Comment #4
das-peter commentedI can imagine that this was / is version specific. So why not checking if the table exists (https://api.drupal.org/api/drupal/includes%21database%21database.inc/fun...)? And only run the query if it does.
So if we now set the variable to an empty array why should we still have coder iterating over it?
Comment #5
jmdeleon commenteddas-peter: Thanks for the suggestions. I have attempted rolling a less-destructive patch, attached here.
Comment #6
jmdeleon commentedComment #8
das-peter commentedThanks for the patch! Committed & pushed.