Quick repair called from manifest.php crashes

I am using a module to install a custom scheduler in SuiteCRM.

Everything works fine except two things:

  1. Problem 1: Quick Repair crashes
    if I put in the script folder a file called post_install.php with some code that calls Quick Repair and Rebuild, when I load the module through Module Loader SuiteCRM crashes with a white page (the custom schedule gets installed though).
    The content of my file is quite simple, and, having googled around and searched for the similar calls in the SuiteCRM code I don’t understand exactly why it causes the white screen crash.
    For completeness this is my the content of my file:

Version 1 (using a string for β€˜All Modules’)
'[CODE]

<?php if (! defined('sugarEntry') || ! sugarEntry) die('Not A Valid Entry Point'); function post_install() { require_once("modules/Administration/QuickRepairAndRebuild.php"); $fta_qrr = new RepairAndClear(); $fta_qrr ->repairAndClearAll(array('clearAll'), array('All Modules'), FALSE, TRUE); } [/CODE] Version 2 (using a the function translate for 'All Modules') '[CODE] <?php if (! defined('sugarEntry') || ! sugarEntry) die('Not A Valid Entry Point'); function post_install() { require_once("modules/Administration/QuickRepairAndRebuild.php"); $fta_qrr = new RepairAndClear(); $fta_qrr ->repairAndClearAll(array('clearAll'), array(translate('LBL_ALL_MODULES')), FALSE, TRUE); } [/CODE] I get no errors iin either the SuiteCRM log nor the Apache log. At first I thought that the function translate could have not been defined or that the label LBL_ALL_MODULES was not defined (serching through the SuiteCRM code this label is defined more than once so I don't know if Module Loader loads the correct files for both translate and LBL_ALL_MODULES) 2. Problem 2: my custom scheduler runs only after I fiddle around with it and save it from within the SuiteCRM I have noticed that, after having loaded the custom scheduler via Module Loader my custom scheduler editview shows it as URL in the [img]/uploads/migrated/kunena/attachments/2250/2015-11-05_090330.jpg[/img] How can I define it so that the scheduler job is saved instead of the blank option URL If I click on the dropdown menu where it says URL, I can see my custom scheduler in the list, so, if I select it and save it seems to start working. I say it seems because I also changed the periodicity from */15 minutes to * minutes (after these two changes together the custom scheduler started running, and it continues if I re-enter */15 minutes). My definition of the scheduler in manifest.php is: [CODE] <?php /********************************************************************************* * This code was developed by: * Author * You can contact us at: * Web: www.mysite.com * Email: info@mysite.com ********************************************************************************/ $manifest = array( 'acceptable_sugar_flavors' => array( 'CE', ), 'acceptable_sugar_versions' => array( '6*', ), 'is_uninstallable' => true, 'name' => 'My Custom Scheduler', 'author' => 'Author', 'description' => 'My Custom Scheduler', 'published_date' => '2015/10/30', 'version' => 'v1.0', 'type' => 'module', ); $installdefs = array ( 'id' => 'FTA_MyCustomScheduler', 'language' => array ( array( 'from'=> '/en_us.fta_my_custom_scheduler.php', 'to_module'=> 'Schedulers', 'language'=>'en_us' ), ), 'scheduledefs' => array ( array ( 'from' => '/fta_my_custom_scheduler.php', ), ), 'copy' => array( array('from'=> '/custom/modules/FTA_MyCustomScheduler/fta_my_custom_scheduler_code.php', 'to'=> 'custom/modules/FTA_MyCustomScheduler/fta_my_custom_scheduler_code.php', ), ), 'post_execute' => array ( 0 => '/scripts/FTA_MyCustomSchedulerTask.php', ), ); ?>

[/CODE]

I also have other files among which one with the labels used and a file which defines the function used for the scheduler and adds its name to the job_strings array.

Thanks for any help which will be appreciated!