fix: honest installer success message #121

Closed
jmiller wants to merge 2 commits from fix/honest-install-success into dev
Owner

Summary

Applies the "honest installer success" pattern (mirrors MokoSuiteHQ PR #72 / MokoSuiteClient PR #300). This repo ships two manifests with <scriptfile>, so both are gated:

1. Package — pkg_mokoog.xml / source/script.php

postflight() now calls a new private missingChildExtensions() verifier that reads $parent->getParent()->getManifest(), iterates $manifest->files->file, and confirms each declared extension registered in #__extensions (element = id, minus a leading plg_<group>_ for plugins; plugins also match folder = group). Missing → error (htmlspecialchars'd) + return before the license message. Download-key restore and plugin enable were reordered to run unconditionally before the gate.

2. Component — com_mokoog/mokoog.xml / com_mokoog/script.php

The install()/update() methods echoed "installed successfully" unconditionally. They now call a new private missingTables() verifier that reads JPATH_ADMINISTRATOR/components/com_mokoog/sql/install.mysql.sql, extracts every CREATE TABLE #__name, resolves the live prefix, and checks each against getTableList() (case-insensitive). Missing → error echo + return before the success message.

Both verifiers use the container DB accessor (matching this repo's J7 forward-compat removal of Factory::getDbo) and fail open (try/catch → []). php -l passes on both files.

https://claude.ai/code/session_01B9aZHSWbiiZykJD88pYx8R

## Summary Applies the "honest installer success" pattern (mirrors MokoSuiteHQ PR #72 / MokoSuiteClient PR #300). This repo ships **two** manifests with `<scriptfile>`, so both are gated: ### 1. Package — `pkg_mokoog.xml` / `source/script.php` `postflight()` now calls a new private `missingChildExtensions()` verifier that reads `$parent->getParent()->getManifest()`, iterates `$manifest->files->file`, and confirms each declared extension registered in `#__extensions` (element = `id`, minus a leading `plg_<group>_` for plugins; plugins also match `folder = group`). Missing → `error` (htmlspecialchars'd) + return **before** the license message. Download-key restore and plugin enable were reordered to run unconditionally before the gate. ### 2. Component — `com_mokoog/mokoog.xml` / `com_mokoog/script.php` The `install()`/`update()` methods echoed "installed successfully" unconditionally. They now call a new private `missingTables()` verifier that reads `JPATH_ADMINISTRATOR/components/com_mokoog/sql/install.mysql.sql`, extracts every `CREATE TABLE #__name`, resolves the live prefix, and checks each against `getTableList()` (case-insensitive). Missing → error echo + return **before** the success message. Both verifiers use the container DB accessor (matching this repo's J7 forward-compat removal of `Factory::getDbo`) and fail open (try/catch → `[]`). `php -l` passes on both files. https://claude.ai/code/session_01B9aZHSWbiiZykJD88pYx8R
jmiller added 2 commits 2026-07-06 16:19:43 +00:00
fix: honest installer success message
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 12s
29f83d06ee
Gate the installer success/license/next-steps message behind a fail-open
verifier so the installer never reports success when the install failed or
only partially completed.

- Package scripts: verify every child extension declared in the manifest
  actually registered in #__extensions before showing the license message.
- com_mokoog component script: verify the declared SQL tables exist before
  echoing the success message.

Mirrors MokoSuiteHQ PR #72 and MokoSuiteClient PR #300. Both checks are wrapped
in try/catch and fail open, so a transient DB/IO glitch never fakes a failure.

Claude-Session: https://claude.ai/code/session_01B9aZHSWbiiZykJD88pYx8R
Author
Owner

Closing as redundant. PR #120 ("fix(installer): gate install-success on real verification") was merged into dev (commit fe38a42) after this branch was cut and already implements the identical honest-install pattern for both the package script (missingChildExtensions()) and the com_mokoog component script (missingTables()). This PR now conflicts with that work and adds nothing beyond it. No action needed on OpenGraph.

Closing as redundant. PR #120 ("fix(installer): gate install-success on real verification") was merged into `dev` (commit fe38a42) after this branch was cut and already implements the identical honest-install pattern for both the package script (`missingChildExtensions()`) and the `com_mokoog` component script (`missingTables()`). This PR now conflicts with that work and adds nothing beyond it. No action needed on OpenGraph.
jmiller closed this pull request 2026-07-06 16:22:58 +00:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.