fix(installer): self-heal admin menu + alias collision + short-constant label #219

Merged
jmiller merged 2 commits from fix/admin-menu-selfheal into dev 2026-07-05 23:31:43 +00:00
Owner

Targeting dev for the next dev build (stacks on the SQL-install fix).

Cleans up the admin-menu fallout of the duplicate-component element bug — the cascade you saw: alias collision → install aborts → "Backup" menu deleted → gone from the admin menu → cPanel module + MokoSuiteClient can't find it.

Changes

  1. Preflight orphan removalremoveOrphanedComponent() now also runs in preflight, before the component recreates its menu. The orphan (com_component-mokosuitebackup) owns a "Backup" menu with alias backup; removing it first stops the collision (The alias backup is already being used by the Backup menu item).
  2. Self-healing top menuensureSubmenuItems() used to return when the parent "Backup" menu was missing (so a deleted menu never came back). It now recreates the top-level menu via new createTopMenu(), then rebuilds the submenus. Backup reappears in the admin menu → cPanel module + MokoSuiteClient detection recover.
  3. Short constant label — the top menu label is now COM_MOKOJOOMBACKUP_SHORT (in the manifest <menu> and normalized in the script), so it reads "Backup" via the short constant, not a full/hardcoded value. Constant is defined in .ini and .sys.ini.

php -l clean, manifest XML valid.

Note

MokoSuiteClient "not recognizing" the component and the cPanel module's missing item are downstream of the broken registration/menu — they should recover once a clean build reinstalls with a valid com_mokosuitebackup registration + menu. If MokoSuiteClient still can't see it after this, its detection logic may need a separate look (it may key off something other than the menu/#__extensions).

https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i

Targeting **dev** for the next dev build (stacks on the SQL-install fix). Cleans up the admin-menu fallout of the duplicate-component element bug — the cascade you saw: alias collision → install aborts → "Backup" menu deleted → gone from the admin menu → cPanel module + MokoSuiteClient can't find it. ## Changes 1. **Preflight orphan removal** — `removeOrphanedComponent()` now also runs in **preflight**, *before* the component recreates its menu. The orphan (`com_component-mokosuitebackup`) owns a "Backup" menu with alias `backup`; removing it first stops the collision (`The alias backup is already being used by the Backup menu item`). 2. **Self-healing top menu** — `ensureSubmenuItems()` used to `return` when the parent "Backup" menu was missing (so a deleted menu never came back). It now **recreates the top-level menu** via new `createTopMenu()`, then rebuilds the submenus. Backup reappears in the admin menu → cPanel module + MokoSuiteClient detection recover. 3. **Short constant label** — the top menu label is now `COM_MOKOJOOMBACKUP_SHORT` (in the manifest `<menu>` and normalized in the script), so it reads "Backup" via the short constant, not a full/hardcoded value. Constant is defined in `.ini` and `.sys.ini`. `php -l` clean, manifest XML valid. ## Note MokoSuiteClient "not recognizing" the component and the cPanel module's missing item are **downstream** of the broken registration/menu — they should recover once a clean build reinstalls with a valid `com_mokosuitebackup` registration + menu. If MokoSuiteClient still can't see it after this, its detection logic may need a separate look (it may key off something other than the menu/#__extensions). https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i
jmiller added 2 commits 2026-07-05 23:31:28 +00:00
fix(installer): self-heal admin menu; fix alias collision; short-constant label
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 22s
2af2641712
Fallout of the duplicate-component element bug:

- Preflight now runs removeOrphanedComponent() BEFORE the component install
  recreates its menu, so the orphan's "Backup" menu (alias "backup") no longer
  collides ("The alias backup is already being used by the Backup menu item").
- ensureSubmenuItems() recreates the top-level "Backup" menu when it is missing
  (via new createTopMenu()) instead of bailing out — so a failed install that
  deleted the parent menu no longer leaves Backup gone from the admin menu (which
  also broke the cPanel module and MokoSuiteClient component detection).
- The top-level menu label now uses the short constant COM_MOKOJOOMBACKUP_SHORT
  (manifest <menu> + enforced/normalized in the script).

Claude-Session: https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i
chore(version): pre-release bump to 02.57.05-dev [skip ci]
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 2s
1c420b2277
jmiller merged commit 77bfaff8cd into dev 2026-07-05 23:31:43 +00:00
jmiller deleted branch fix/admin-menu-selfheal 2026-07-05 23:31:44 +00:00
Sign in to join this conversation.