fix: add user-facing warnings for remaining silent failures
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Access control (push) Successful in 2s
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Generic: Repo Health / Access control (pull_request) Successful in 1s
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 5s
Joomla: Extension CI / Lint & Validate (pull_request) Failing after 11s
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Successful in 12s
Universal: Auto Version Bump / Version Bump (push) Successful in 14s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 8s
Universal: PR Check / Validate PR (pull_request) Failing after 31s
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled

- preflight_saveKey: warn user if license key could not be preserved
- createDefaultScheduledTask: warn user to create task manually
- migrateDefaultBackupDir: warn user to review profile settings
- createBackupDirectory: warn if .htaccess protection file fails
- boot(): widen catch to \Exception for consistency
This commit is contained in:
Jonathan Miller
2026-06-13 06:31:08 -05:00
parent ba8d9fa556
commit eb0b41101b
2 changed files with 24 additions and 2 deletions
+23 -1
View File
@@ -103,6 +103,11 @@ class Pkg_MokoSuiteBackupInstallerScript
}
} catch (\Exception $e) {
error_log('MokoSuiteBackup: Could not save download key: ' . $e->getMessage());
Factory::getApplication()->enqueueMessage(
'MokoSuiteBackup could not preserve your download/license key before the update. '
. 'Please verify your license key is still configured in System → Update Sites after this update completes.',
'warning'
);
}
}
@@ -213,7 +218,14 @@ class Pkg_MokoSuiteBackupInstallerScript
$htaccess = $backupDir . '/.htaccess';
if (!file_exists($htaccess)) {
file_put_contents($htaccess, "Order Deny,Allow\nDeny from all\n");
if (file_put_contents($htaccess, "Order Deny,Allow\nDeny from all\n") === false) {
error_log('MokoSuiteBackup: Failed to write .htaccess to ' . $backupDir);
Factory::getApplication()->enqueueMessage(
'MokoSuiteBackup created the backup directory but could not write an .htaccess file to protect it. '
. 'Please manually create <code>' . htmlspecialchars($htaccess) . '</code> with "Deny from all" to prevent direct web access.',
'warning'
);
}
}
$indexHtml = $backupDir . '/index.html';
@@ -262,6 +274,11 @@ class Pkg_MokoSuiteBackupInstallerScript
}
} catch (\Exception $e) {
error_log('MokoSuiteBackup: migrateDefaultBackupDir() failed: ' . $e->getMessage());
Factory::getApplication()->enqueueMessage(
'MokoSuiteBackup could not automatically migrate backup directory settings in your profiles. '
. 'Please review your backup profiles and ensure the backup directory is set correctly.',
'warning'
);
}
}
@@ -322,6 +339,11 @@ class Pkg_MokoSuiteBackupInstallerScript
$db->insertObject('#__scheduler_tasks', $task);
} catch (\Exception $e) {
error_log('MokoSuiteBackup: createDefaultScheduledTask() failed: ' . $e->getMessage());
Factory::getApplication()->enqueueMessage(
'MokoSuiteBackup could not create the default scheduled backup task. '
. 'Please create a scheduled task manually in System &rarr; Scheduled Tasks to enable automated backups.',
'warning'
);
}
}