[Rt-commit] rt branch, 3.8.9-releng, updated. rt-3.8.8-241-g0e9297d

Kevin Falcone falcone at bestpractical.com
Tue Dec 28 17:07:00 EST 2010


The branch, 3.8.9-releng has been updated
       via  0e9297df62ac13927ff0f6ed5f61e8c61ccadfe2 (commit)
      from  d158630a2e048ee053a2a25f1fd6515562174c55 (commit)

Summary of changes:
 lib/RT.pm.in |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 0e9297df62ac13927ff0f6ed5f61e8c61ccadfe2
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Tue Dec 28 11:59:33 2010 -0500

    Log an error, but don't die when there are invalid Scrips
    
    This caused RT to refuse to start if you had picked an invalid
    ScripAction or ScripCondition in an earlier release of RT (such as '-')
    before we started blocking that in the UI.  Also, if you installed a
    plugin that created a Scrip and then disabled the plugin, RT would
    refuse to start.
    (cherry picked from commit bef216fc7dad54487d43d83954c8a30cd6fb126a)

diff --git a/lib/RT.pm.in b/lib/RT.pm.in
index 3d2fa7e..dc5985e 100755
--- a/lib/RT.pm.in
+++ b/lib/RT.pm.in
@@ -484,7 +484,10 @@ sub InitClasses {
         my $scrips = RT::Scrips->new($RT::SystemUser);
         $scrips->Limit( FIELD => 'Stage', OPERATOR => '!=', VALUE => 'Disabled' );
         while ( my $scrip = $scrips->Next ) {
-            $scrip->LoadModules;
+            local $@;
+            eval { $scrip->LoadModules } or
+                $RT::Logger->error("Invalid Scrip ".$scrip->Id.".  Unable to load the Action or Condition.  ".
+                                   "You should delete or repair this Scrip in the admin UI.\n$@\n");
         }
 
 	foreach my $class ( grep $_, RT->Config->Get('CustomFieldValuesSources') ) {

-----------------------------------------------------------------------


More information about the Rt-commit mailing list