install_include() throws errors - please help

reglogge - November 2, 2009 - 12:23
Project:Install Profile API
Version:6.x-2.1
Component:CRUD functions and includes
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

during installing Drupal (6.14) with my own installation profile I cannot create a custom content type. The installation profile runs through without any error messages, but the new cck-content-type is not created.

In the logs after installing the site I find these error messages:

array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #1 is not an array in /Volumes/devdisk/htdocs/aks-d-6.1/www/sites/all/modules/install_profile_api/install_profile_api.module in line 33.

array_unique() [<a href='function.array-unique'>function.array-unique</a>]: The argument should be an array in /Volumes/devdisk/htdocs/aks-d-6.1/www/sites/all/modules/install_profile_api/install_profile_api.module in line 33.

Invalid argument supplied for foreach() in /Volumes/devdisk/htdocs/aks-d-6.1/www/sites/all/modules/install_profile_api/install_profile_api.module in line 35.

The code referred to in the error messages is from install_profile_api.module where it tries to include the .inc-files of the installed modules

Here's the (I think) relevant parts of my install profile:

function aks_profile_modules() {
  $core = array('block', 'comment', 'contact', 'filter', 'help', 'locale', 'menu', 'node', 'path', 'search', 'system', 'taxonomy', 'user', 'dblog');
  $contrib = array('admin_menu', 'content', 'content_copy', 'fieldgroup', 'nodereference', 'number', 'optionwidgets', 'text', 'cck_autocomplete', 'computed_field', 'context', 'context_ui', 'context_contrib', 'date_api', 'date_timezone', 'date', 'ed_readmore', 'features', 'filefield', 'filefield_meta', 'filefield_paths', 'globalredirect', 'imageapi', 'imageapi_gd', 'imagecache', 'imagecache_ui', 'imagefield', 'imagefield_tokens', 'install_profile_api', 'lightbox2', 'link', 'pathauto', 'token', 'transliteration', 'views', 'views_ui', 'views_export', 'webform', 'weight');
  return array_merge($core, $contrib);
}

function aks_profile_tasks() {

install_include(aks_profile_modules());

...

// Installing content types
install_include(install_content_copy_import_from_file('profiles/aks/cck/booktip.inc', $type_name = ''));
}

The modules from function aks_profile_modules() all get installed correctly.

It seems to me as if the function install_include() from install_profile_api.module has a problem with processing the $modules array but I can't find the solution.

Any suggestions would be greatly appreciated

 
 

Drupal is a registered trademark of Dries Buytaert.