Top Tags

Notice: Undefined index: distribution_name in drupal_install_profile_distribution_name()

I am testing the upgrade of a D6 site to D7. The D6 site was probable installed using acquila - and thus having profile name of acquila. As I have not installed/used acquila on the D7 site, the acquila profile is not available.

I debugged the process and could see in install.inc

but acquila was not enabled neither as a profile or as a module. So, I played with the variable table and deleted the 'installed_profile' variable - the default is ' standard' -- but standard was not enabled as a profile.

Here comes in drush (http://drupal.org/projects/drush and http://drush.ws). I enabled the standard profile by

drush -l http://localhost pm-enable standard

I was asked to enable some more standard modules and I got a whole host of warnings -- I just ignored them (was that a bad thing?? I don't know)

The following extensions will be enabled: rdf, overlay, toolbar, shortcut, file, image, dashboard, contextual, standard
Do you really want to continue? (y/n): y
WD php: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'Filtered HTML' for key      [error]
'name': INSERT INTO {filter_format} (format, name, cache, status, weight) VALUES (:db_insert_placeholder_0,
:db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array
(
    [:db_insert_placeholder_0] => filtered_html
    [:db_insert_placeholder_1] => Filtered HTML
    [:db_insert_placeholder_2] => 1
    [:db_insert_placeholder_3] => 1
    [:db_insert_placeholder_4] => 0
)
 in filter_format_save() (line 210 of /Users/paddy/Sites/modules/filter/filter.module).
WD php: Warning: Cannot modify header information - headers already sent by (output started at                           [warning]
/Users/paddy/Sites/sites/all/modules/drush/includes/drush.inc:579) in drupal_send_headers() (line 1039 of
/Users/paddy/Sites/includes/bootstrap.inc).
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'Filtered HTML' for key 'name': INSERT INTO {filter_format} (format, name, cache, status, weight) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array
(
    [:db_insert_placeholder_0] => filtered_html
    [:db_insert_placeholder_1] => Filtered HTML
    [:db_insert_placeholder_2] => 1
    [:db_insert_placeholder_3] => 1
    [:db_insert_placeholder_4] => 0
)
 in filter_format_save() (line 210 of /Users/paddy/Sites/modules/filter/filter.module).

BUT - I no longer have the undefined index error.

I hope that this gives inspiration to someone to find a definitive solution when you upgrade from D6 with one profile to D7 where that profile does not exist.