Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have created an install profile that features node_gallery module. I try to install the site using drush site-install but it fails giving the following:
Starting Drupal installation. This takes a few seconds ... [ok]
WD php: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dbname.system' doesn't exist: SELECT name, [error]
schema_version FROM {system} WHERE type = :type; Array
(
[:type] => module
)
in drupal_get_installed_schema_version() (line 155 of /path/to/drupal/includes/install.inc).
WD php: Warning: Cannot modify header information - headers already sent by (output started at [warning]
/usr/share/php/drush/includes/output.inc:37) in drupal_send_headers() (line 1217 of
/path/to/sdrupal/includes/bootstrap.inc).
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dbname.system' doesn't exist: SELECT name, schema_version FROM {system} WHERE type = :type; Array
(
[:type] => module
)
in drupal_get_installed_schema_version() (line 155 of /path/to/drupal/includes/install.inc).
Drush command terminated abnormally due to an unrecoverable error.
If I remove node_gallery from the install profile the site builds without issue.
Comment | File | Size | Author |
---|---|---|---|
#3 | node_gallery-install-profile-2195855-3.patch | 1.59 KB | zengenuity |
Comments
Comment #1
zengenuity CreditAttribution: zengenuity commentedI have some idea why this might happen, but I'm not going to have time to look at this anytime soon. Let me point in the right direction, and if you can work out a fix, I will be glad to review your patch.
There's a series of things that happen in the hook_install() and hook_requirements() functions in the .install files for Node Gallery and Node Gallery API. (to create entity types and fields, detect D6 tables that need to be upgraded, etc.) It sounds like something may be written in such as way that it doesn't work during an install profile install. You should debug it from there to see what specifically is the problem.
Comment #2
Dante Blitz CreditAttribution: Dante Blitz commentedI beilieve I have found the offending code.
It is in the node_gallery_api_requirements function in node_gallery_api.install...
It appears to be $node_gallery_schema = drupal_get_installed_schema_version('node_gallery'). My workaround is to simply comment out all the above code as I am not running a fresh D7 site.
Comment #3
zengenuity CreditAttribution: zengenuity commentedOkay, let's try checking for the D6 table first, then only getting the schema if that exists. Can you test this patch?
Comment #4
kenorb CreditAttribution: kenorb commented