INstall fails when installing module from profiles

raiteria - May 15, 2009 - 14:33
Project:Rep[lacement]Tags
Version:6.x-1.x-dev
Component:Installation / Configuration
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

Cannot use required modules, prior to full module installation. Module table has not been fully created.

Move the requires into a seperate routine and call these from the functions that use the helpers.

Example is shown below.

//require_once(drupal_get_path('module', 'reptag') .'/reptag_helper.inc');
//require_once(drupal_get_path('module', 'reptag') .'/reptag_module.inc');

/**
* Include all Rep Tag include files.
*/
function _reptag_include() {
$reptag_path = drupal_get_path('module', 'reptag');
require_once($reptag_path .'/reptag_helper.inc');
require_once($reptag_path .'/reptag_module.inc');
}

function reptag_install() {

// only do includes after the system modules are installed
_reptag_include ();

// Create tables
drupal_install_schema('reptag');
// Insert default values (enabled modules, default roles, ...)
variable_set('reptag_plainrep_roles', serialize(array(DRUPAL_ANONYMOUS_RID)));

 
 

Drupal is a registered trademark of Dries Buytaert.