You would think that it would be very easy to promote a custom module from one environment to the next, but it is not as straight forward as it should be. But, if you know the steps it is fairly easy.  Here they are:

  • Copy the /modules/<mod_name> folder to the new environment
  • Copy the /custom/modules/<mod_name> folder to the new environment

At this point we should just do a 'Quick Repair' and call it a day, but we still have a lot of work to do.

  • In a file called /custom/application/Ext/Language/en_us.lang.ext.php we need to add a line that like this

$app_listStrings['moduleList']['<mod_name>'] = '<Module Name>';

  • In that same file we also need to add a lines for any "Dropdown Lists" that we created and it should look something like these:

$app_list_strings['<list_name>']['<list_value1>'] = '<Label Value1>';
$app_list_strings['<list_name>']['<list_value2>'] = '<Label Value2>';
$app_list_strings['<list_name>']['<list_value3>'] = '<Label Value3>';

  • In a folder called /custom/Extention/application/Ext/TableDictionary copy the relationship file from the old environment to the new.
  • In a folder called /custom/Extention/Application/Ext/Include copy the <ModuleName>.php file
  • Copy any Logic Hook include files (mine are in /custom/include)
  • Edit your custom/application/Ext/Include/modules.ext.php file and add the following lines

$beanList['ProjectTask'] = 'ProjectTask';
$beanFiles['ProjectTask'] = 'modules/ProjectTask/ProjectTask.php';
$moduleList[] = 'ProjectTask';

  • Now go to Admin/Repair/Quick Repair and run that -- be sure to run any scripts to add tables / columns to the database. 
  • Check the /cache/modules/<mod_name> folder to verify that the ModuleName.php file is in it. 
  • Check the database to verify that the new table(s) was/were added.  
  • Navigate to Admin/Configure Tab Groups and we should be able to move our new module into a tab group. Do that.
  • Navigate to Admin/Repair/Repair Roles and run it on our new module
  • Navigate to Admin/Role Management and assign the proper User Roles to the module.
  • Run the Admin/Repair/Quick Repair one more time
  • Done