diff --git a/Kernel/Modules/Installer.pm b/Kernel/Modules/Installer.pm index f1c20957e1..b3d37ecb16 100644 --- a/Kernel/Modules/Installer.pm +++ b/Kernel/Modules/Installer.pm @@ -1154,8 +1154,9 @@ sub ConnectToDB { ); } + # Connect to the database without logging errors, as they are already shown to the user. my $DBH = DBI->connect( - $Param{DSN}, $Param{DBUser}, $Param{DBPassword}, + $Param{DSN}, $Param{DBUser}, $Param{DBPassword}, { PrintError => 0 } ); if ( !$DBH ) { diff --git a/Kernel/Output/HTML/Layout.pm b/Kernel/Output/HTML/Layout.pm index 3de1d2ffcc..be65b927da 100644 --- a/Kernel/Output/HTML/Layout.pm +++ b/Kernel/Output/HTML/Layout.pm @@ -1310,7 +1310,9 @@ sub Header { # Generate the minified CSS and JavaScript files and the tags referencing them (see LayoutLoader) $Self->LoaderCreateAgentCSSCalls(); - $Self->LoaderCreateDynamicCSS(); + if ( !$Self->{InstallerOnly} ) { + $Self->LoaderCreateDynamicCSS(); + } my %AgentLogo; @@ -1758,10 +1760,14 @@ sub Footer { } # Set an array with pending states. - my @PendingStateIDs = $Kernel::OM->Get('Kernel::System::State')->StateGetStatesByType( - StateType => [ 'pending reminder', 'pending auto' ], - Result => 'ID', - ); + my @PendingStateIDs; + + if ( !$Self->{InstallerOnly} ) { + @PendingStateIDs = $Kernel::OM->Get('Kernel::System::State')->StateGetStatesByType( + StateType => [ 'pending reminder', 'pending auto' ], + Result => 'ID', + ); + } # add JS data my %JSConfig = ( diff --git a/Kernel/System/Package.pm b/Kernel/System/Package.pm index c60a3adeac..799ea96e0f 100644 --- a/Kernel/System/Package.pm +++ b/Kernel/System/Package.pm @@ -2571,7 +2571,11 @@ sub PackageInstallDefaultFiles { # get main object my $MainObject = $Kernel::OM->Get('Kernel::System::Main'); - my $Directory = $Self->{ConfigObject}->Get('Home') . '/var/packages'; + my $Directory = $Self->{ConfigObject}->Get('Home') . '/var/packages'; + + # Return if the directory does not exist. + return if !-e $Directory; + my @PackageFiles = $MainObject->DirectoryRead( Directory => $Directory, Filter => '*.opm',