fix(installer): verify install success before showing success #256
Reference in New Issue
Block a user
Delete Branch "fix/installer-success-detection"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Joomla installers are lenient: a failed sub-step is logged but postflight still runs, so any success/license/next-steps message can lie. This gates the success path in both installer scripts.
Package script (
source/script.php, pkg_mokosuitecross)missingChildExtensions()which reads the package manifest viagetParent()->getManifest()and verifies each declared<file>child is registered in#__extensions(matchelement+type, plusfolder=groupfor plugins).returnbeforewarnMissingLicenseKey().Component script (
source/packages/com_mokosuitecross/script.php, com_mokosuitecross)missingTables()which parses the installedsql/install.mysql.sqlfor everyCREATE TABLEand verifies each exists (prefix-substituted, case-insensitive againstgetTableList()).returnbefore the success/license notice; otherwise show the install-success message.Safety
[]) so a glitch never turns a good install into a false failure.htmlspecialchars()-escaped; table/child lists are derived dynamically (nothing hardcoded).php -lpasses on both files.https://claude.ai/code/session_01MrxXW9iyuDda5yDZrjZMbF