diff --git a/.mokogitea/ISSUE_TEMPLATE/config.yml b/.mokogitea/ISSUE_TEMPLATE/config.yml index d4d49ec..71fe271 100644 --- a/.mokogitea/ISSUE_TEMPLATE/config.yml +++ b/.mokogitea/ISSUE_TEMPLATE/config.yml @@ -8,7 +8,7 @@ contact_links: url: https://mokoconsulting.tech/ about: Get help or ask questions through our website - name: πŸ“š MokoStandards Documentation - url: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + url: https://git.mokoconsulting.tech/MokoConsulting/.mokogitea/wiki about: View our coding standards and best practices - name: πŸ”’ Report a Security Vulnerability url: https://git.mokoconsulting.tech/mokoconsulting-tech/.github-private/security/advisories/new diff --git a/.mokogitea/ISSUE_TEMPLATE/feature_request.md b/.mokogitea/ISSUE_TEMPLATE/feature_request.md index 7b76dc9..984fcbe 100644 --- a/.mokogitea/ISSUE_TEMPLATE/feature_request.md +++ b/.mokogitea/ISSUE_TEMPLATE/feature_request.md @@ -37,7 +37,7 @@ If you have ideas about how this could be implemented, share them here: Add any other context, mockups, or screenshots about the feature request here. ## Relevant Standards -Does this relate to any standards in [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)? +Does this relate to any standards in [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/.mokogitea/wiki)? - [ ] Accessibility (WCAG 2.1 AA) - [ ] Localization (en_US/en_GB) - [ ] Security best practices diff --git a/.mokogitea/ISSUE_TEMPLATE/security.md b/.mokogitea/ISSUE_TEMPLATE/security.md index f57b284..14d63e0 100644 --- a/.mokogitea/ISSUE_TEMPLATE/security.md +++ b/.mokogitea/ISSUE_TEMPLATE/security.md @@ -35,7 +35,7 @@ Use this template only for: ## Standards Reference -Does this relate to security standards in [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)? +Does this relate to security standards in [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/.mokogitea/wiki)? - [ ] SPDX license identifiers - [ ] Secret management - [ ] Dependency security diff --git a/.mokogitea/workflows/issue-branch.yml b/.mokogitea/workflows/issue-branch.yml index eb67f8f..9a06de1 100644 --- a/.mokogitea/workflows/issue-branch.yml +++ b/.mokogitea/workflows/issue-branch.yml @@ -3,9 +3,9 @@ # SPDX-License-Identifier: GPL-3.0-or-later # # FILE INFORMATION -# DEFGROUP: MokoGitea.Workflow +# DEFGROUP: Gitea.Workflow # INGROUP: mokocli.Automation -# VERSION: 01.00.00 +# VERSION: 01.00.30 # BRIEF: Auto-create feature branch when an issue is opened name: "Universal: Issue Branch" @@ -19,7 +19,7 @@ permissions: issues: write env: - MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} + GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} jobs: create-branch: @@ -28,8 +28,8 @@ jobs: steps: - name: Create branch and comment run: | - TOKEN="${{ secrets.MOKOGITEA_TOKEN }}" - API="${MOKOGITEA_URL}/api/v1/repos/${{ github.repository }}" + TOKEN="${{ secrets.GA_TOKEN }}" + API="${GITEA_URL}/api/v1/repos/${{ github.repository }}" ISSUE_NUM="${{ github.event.issue.number }}" ISSUE_TITLE="${{ github.event.issue.title }}" @@ -58,7 +58,7 @@ jobs: echo "Created branch: ${BRANCH}" # Comment on issue with branch link - REPO_URL="${MOKOGITEA_URL}/${{ github.repository }}" + REPO_URL="${GITEA_URL}/${{ github.repository }}" BODY="Branch created: [\`${BRANCH}\`](${REPO_URL}/src/branch/${BRANCH})\n\n\`\`\`bash\ngit fetch origin\ngit checkout ${BRANCH}\n\`\`\`" curl -sf -X POST \ diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cee4b0..779775b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ ## [Unreleased] +### Fixed +- **Honest install success** β€” the package installer no longer shows the license / next-steps message when a bundled child extension failed to install. Postflight now verifies every extension declared in the package manifest actually registered in `#__extensions` and enqueues an error instead. Verification fails open, so a transient DB/IO glitch never fakes a failure. + ### Added - **Package Manifest** β€” `pkg_mokosuiteeditor.xml` with dlid and updateservers - **Source Structure** β€” directory scaffolding for editor plugin diff --git a/CLAUDE.md b/CLAUDE.md index 0caf916..8f69ef7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -43,8 +43,8 @@ Joomla **package** (`pkg_mokosuiteeditor`) β€” standalone editor plugin, no Moko - **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js` - **Attribution**: `Authored-by: Moko Consulting` - **Workflow directory**: `.mokogitea/` -- **Wiki**: documentation lives in the Gitea wiki, not `docs/` files -- **Standards**: [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoCLI/wiki) +- **Wiki**: documentation lives in the MokoGitea wiki, not `docs/` files +- **Standards**: [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/.mokogitea/wiki) - **Changelog**: `[Unreleased]` only β€” release system assigns versions - **No upstream references**: never reference competitor editor products diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index da3e7d8..7b8a381 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -14,7 +14,7 @@ DEFGROUP: Template-Joomla INGROUP: Template-Joomla.Documentation REPO: https://github.com/mokoconsulting-tech/Template-Joomla/ - VERSION: 01.00.21 + VERSION: 01.00.30 PATH: ./CODE_OF_CONDUCT.md BRIEF: Community expectations and enforcement guidelines NOTE: Adapted with attribution from the Contributor Covenant v2.1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c0b4858..d7df945 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,7 +34,7 @@ feature/* ──PR──> dev ──draft PR──> (renamed to rc) ──merge 7. **Merging to main** triggers the stable release pipeline: - Minor version bump (e.g., `02.09.xx` β†’ `02.10.00`) - Stability suffix stripped (clean version) - - Gitea release created with ZIP/tar.gz packages + - MokoGitea release created with ZIP/tar.gz packages - `updates.xml` updated (Joomla extensions) - `dev` branch recreated from `main` diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 6d402a5..a34d571 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -19,12 +19,12 @@ DEFGROUP: mokoconsulting-tech.Template-Joomla INGROUP: MokoStandards.Governance REPO: https://github.com/mokoconsulting-tech/Template-Joomla - VERSION: 01.00.21 + VERSION: 01.00.30 PATH: /GOVERNANCE.md BRIEF: Project governance rules, roles, and decision process for Template-Joomla --> -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.00.04-blue)](https://github.com/mokoconsulting-tech/MokoStandards) +[![MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/.mokogitea/wiki)](https://github.com/mokoconsulting-tech/MokoStandards) # Project Governance @@ -32,7 +32,7 @@ This document defines the governance model for the `Template-Joomla` repository within the `mokoconsulting-tech` organization. It is automatically maintained by -[MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards) v04.00.04. +[MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/.mokogitea/wiki) v04.00.04. Full governance policy is defined in the MokoStandards source repository: [docs/policy/GOVERNANCE.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/GOVERNANCE.md) diff --git a/SECURITY.md b/SECURITY.md index 34a06a2..f2f7914 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -23,7 +23,7 @@ DEFGROUP: Template-Joomla INGROUP: Template-Joomla.Documentation REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Joomla PATH: /SECURITY.md -VERSION: 01.00.21 +VERSION: 01.00.30 BRIEF: Security vulnerability reporting and handling policy --> diff --git a/automation/ci-issue-reporter.sh b/automation/ci-issue-reporter.sh index 65c47ba..42399d0 100644 --- a/automation/ci-issue-reporter.sh +++ b/automation/ci-issue-reporter.sh @@ -6,11 +6,11 @@ # # FILE INFORMATION # DEFGROUP: Automation.CI -# INGROUP: moko-platform.Automation -# REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform +# INGROUP: mokocli.Automation +# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli # PATH: /automation/ci-issue-reporter.sh # VERSION: 09.23.00 -# BRIEF: Creates or updates a Gitea issue when a CI gate fails. +# BRIEF: Creates or updates a MokoGitea issue when a CI gate fails. # Deduplicates by searching open issues with the "ci-auto" label # whose title matches the gate. If a matching issue exists, a comment # is appended instead of opening a duplicate. @@ -45,8 +45,8 @@ Optional: --workflow Workflow name for the issue title --repo owner/repo (default: \$GITHUB_REPOSITORY) --run-url URL to the CI run (auto-detected from env) - --token Gitea API token (default: \$GITEA_TOKEN) - --url Gitea base URL (default: \$GITEA_URL) + --token MokoGitea API token (default: \$GITEA_TOKEN) + --url MokoGitea base URL (default: \$GITEA_URL) EOF exit 1 } @@ -213,7 +213,7 @@ print(json.dumps({ ISSUE_NUM=$(echo "$RESPONSE" | grep -oP '"number":\s*\K[0-9]+' | head -1) if [[ -n "$ISSUE_NUM" ]]; then - # Apply label (separate call β€” more reliable across Gitea versions) + # Apply label (separate call β€” more reliable across MokoGitea versions) LABEL_ID=$(curl -sf \ -H "Authorization: token ${GITEA_TOKEN}" \ "${API}/labels" 2>/dev/null \ diff --git a/source/packages/com_mokosuiteeditor/admin/language/en-GB/com_mokosuiteeditor.sys.ini b/source/packages/com_mokosuiteeditor/admin/language/en-GB/com_mokosuiteeditor.sys.ini new file mode 100644 index 0000000..00407da --- /dev/null +++ b/source/packages/com_mokosuiteeditor/admin/language/en-GB/com_mokosuiteeditor.sys.ini @@ -0,0 +1,3 @@ +COM_MOKOSUITEEDITOR="MokoSuite Editor" +COM_MOKOSUITEEDITOR_SHORT="Editor" +COM_MOKOSUITEEDITOR_XML_DESCRIPTION="MokoSuite Editor component." diff --git a/source/packages/com_mokosuiteeditor/mokosuiteeditor.xml b/source/packages/com_mokosuiteeditor/mokosuiteeditor.xml index a4a522b..b679c31 100644 --- a/source/packages/com_mokosuiteeditor/mokosuiteeditor.xml +++ b/source/packages/com_mokosuiteeditor/mokosuiteeditor.xml @@ -5,10 +5,13 @@ 2026-06-23 Copyright (C) 2026 Moko Consulting. GPL-3.0-or-later - 01.00.21 + 01.00.30 Moko\Component\MokoSuiteEditor servicessrctmpl - COM_MOKOSUITEEDITOR + COM_MOKOSUITEEDITOR_SHORT + + en-GB/com_mokosuiteeditor.sys.ini + diff --git a/source/packages/plg_editors_mokosuiteeditor/mokosuiteeditor.xml b/source/packages/plg_editors_mokosuiteeditor/mokosuiteeditor.xml index b1ae9af..5128176 100644 --- a/source/packages/plg_editors_mokosuiteeditor/mokosuiteeditor.xml +++ b/source/packages/plg_editors_mokosuiteeditor/mokosuiteeditor.xml @@ -8,7 +8,7 @@ GPL-3.0-or-later hello@mokoconsulting.tech https://mokoconsulting.tech - 01.00.21 + 01.00.30 8.3 PLG_EDITORS_MOKOSUITEEDITOR_DESC Moko\Plugin\Editors\MokoSuiteEditor diff --git a/source/packages/plg_webservices_mokosuiteeditor/mokosuiteeditor.xml b/source/packages/plg_webservices_mokosuiteeditor/mokosuiteeditor.xml index 86bbf29..b5fdd23 100644 --- a/source/packages/plg_webservices_mokosuiteeditor/mokosuiteeditor.xml +++ b/source/packages/plg_webservices_mokosuiteeditor/mokosuiteeditor.xml @@ -3,7 +3,7 @@ Web Services - MokoSuite Editor mokosuiteeditor Moko Consulting - 01.00.21 + 01.00.30 GPL-3.0-or-later Moko\Plugin\WebServices\MokoSuiteEditor srcservices diff --git a/source/pkg_mokosuiteeditor.xml b/source/pkg_mokosuiteeditor.xml index c5ad569..d9679fd 100644 --- a/source/pkg_mokosuiteeditor.xml +++ b/source/pkg_mokosuiteeditor.xml @@ -2,7 +2,7 @@ Package - MokoSuite Editor mokosuiteeditor - 01.00.21 + 01.00.30 2026-06-21 Moko Consulting hello@mokoconsulting.tech diff --git a/source/script.php b/source/script.php new file mode 100644 index 0000000..7554afe --- /dev/null +++ b/source/script.php @@ -0,0 +1,170 @@ +missingChildExtensions($adapter); + + if (!empty($missing)) + { + Factory::getApplication()->enqueueMessage( + '

MokoSuite Editor did not install correctly.

' + . '

The following bundled extensions are missing: ' + . htmlspecialchars(implode(', ', $missing), ENT_QUOTES) . '

' + . '

Please uninstall MokoSuite Editor and reinstall the full package.

', + 'error' + ); + + return; + } + + $this->warnMissingLicenseKey(); + } + + /** + * Verify every child extension declared in the package manifest actually landed + * in #__extensions. Returns readable labels of any that are missing. + * + * Matching per Joomla's #__extensions uniqueness: + * - type = the "type" attribute + * - element = the "id" attribute, EXCEPT for plugins the manifest often + * declares the full plg__ id, so strip a leading + * plg__ to get the real element; components/modules use id as-is + * - plugins ALSO match folder = the "group" attribute + * + * FAILS OPEN: any error (unreadable manifest, query failure) returns [] so a + * transient glitch never turns a good install into a false failure. + */ + private function missingChildExtensions($parent): array + { + try + { + $manifest = $parent->getParent()->getManifest(); + + if (!$manifest || !isset($manifest->files) || !isset($manifest->files->file)) + { + return []; + } + + $db = Factory::getDbo(); + $missing = []; + + foreach ($manifest->files->file as $file) + { + $attrs = $file->attributes(); + $id = isset($attrs['id']) ? (string) $attrs['id'] : ''; + $exType = isset($attrs['type']) ? (string) $attrs['type'] : ''; + + if ($id === '' || $exType === '') + { + continue; + } + + $group = isset($attrs['group']) ? (string) $attrs['group'] : ''; + $element = $id; + + // Plugin element in #__extensions is the id minus any leading plg__. + if ($exType === 'plugin' && $group !== '') + { + $prefix = 'plg_' . $group . '_'; + + if (strpos($element, $prefix) === 0) + { + $element = substr($element, \strlen($prefix)); + } + } + + $query = $db->getQuery(true) + ->select('COUNT(*)') + ->from($db->quoteName('#__extensions')) + ->where($db->quoteName('element') . ' = ' . $db->quote($element)) + ->where($db->quoteName('type') . ' = ' . $db->quote($exType)); + + if ($exType === 'plugin' && $group !== '') + { + $query->where($db->quoteName('folder') . ' = ' . $db->quote($group)); + } + + if ((int) $db->setQuery($query)->loadResult() === 0) + { + $label = trim((string) $file); + $missing[] = $label !== '' ? preg_replace('/\.zip$/i', '', $label) : $id; + } + } + + return $missing; + } + catch (\Throwable $e) + { + // Fail open β€” never fake a failure on a glitch. + return []; + } + } + + private function warnMissingLicenseKey(): void + { + try + { + $db = Factory::getDbo(); + $app = Factory::getApplication(); + + $query = $db->getQuery(true) + ->select([$db->quoteName('update_site_id'), $db->quoteName('extra_query')]) + ->from($db->quoteName('#__update_sites')) + ->where('(' . $db->quoteName('name') . ' LIKE ' . $db->quote('%MokoSuiteEditor%') + . ' OR ' . $db->quoteName('location') . ' LIKE ' . $db->quote('%MokoSuiteEditor%') . ')') + ->setLimit(1); + $db->setQuery($query); + $site = $db->loadObject(); + + if ($site) + { + $extraQuery = (string) ($site->extra_query ?? ''); + + if (!empty($extraQuery) && strpos($extraQuery, 'dlid=') !== false) + { + parse_str($extraQuery, $parsed); + + if (!empty($parsed['dlid'])) + { + return; + } + } + + $editUrl = 'index.php?option=com_installer&task=updatesite.edit&update_site_id=' . (int) $site->update_site_id; + } + else + { + $editUrl = 'index.php?option=com_installer&view=updatesites'; + } + + $app->enqueueMessage( + 'Moko Consulting License Key Required β€” ' + . 'No download key is configured. Updates will not be available until a valid license key is entered. ' + . 'Enter License Key', + 'warning' + ); + } + catch (\Throwable $e) + { + // Silent β€” avoid breaking install if update_sites query fails + } + } +}