From #373763: field_sql_storage_schema() does not remove the field_config_entity_type table I have discovered that attempting to do a clean install of HEAD on PostgreSQL is absolutely broken. The installer stops with an error "Fatal error: Call to undefined function field_read_fields() in /home/davereid/Projects/drupal-head/modules/field/modules/field_sql_storage/field_sql_storage.install on line 47"
We need to fix it in http://api.drupal.org/api/function/field_sql_storage_schema/7 with either:
module_load_include('inc', 'field', 'field.crud');
or
if (db_table_exists('field_config') && drupal_function_exists('field_read_fields')) {
Also, should we check if db_table_exists('field_config') or module_exists('field')? Does it really matter?
Comments
Comment #1
dave reidComment #2
bjaspan commentedI think that error means that field.module is not loaded when field_sql_module.install is being installed. Not quite sure why that would happen with pgsql but not mysql.
Comment #3
josh waihi commentedSee above, Drupal isn't actually trying to install field_sql_storage at all but merely run #3: install_tasks() - however the insert query used by pgsql invokes the schema api which calls field_sql_storage_schema() which calls the undefined function. This doesn't happen in MySQL because MySQL doesn't use the schema on insert queries.
The patch http://drupal.org/node/349671#comment-1186115 will fix this because it takes drupal_get_schema away from the driver
This needs Crell's approval.
Comment #4
yched commentedShould we mark this as a dupe then ?
Comment #5
catchYep.