From 3b2fe37ce16d6d251347943f1a8a5a4fdc66c28b Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sun, 24 May 2026 23:15:29 -0500 Subject: [PATCH 01/11] chore: update CHANGELOG for 02.05.00 stable release Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) --- CHANGELOG.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa34726c..b353789b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - License/subscription check - System email template branding (DB approach) +## [02.05.00] - 2026-05-24 + +### Added +- Joomla `protected=1` flag on all MokoWaaS extensions (framework-level disable/uninstall prevention) +- Self-healing protected flag — restored each admin session if cleared +- Block non-master disable via plugin list toggle (`plugins.publish`) +- Package script sets `protected=1, locked=0` on every install/update +- Legacy plugin entry in updates.xml for sites upgrading from standalone plugin + +### Fixed +- CI: auto-release workflow `pkg_pkg_` duplication in release names, ZIP filenames, and SHA256 paths +- CI: auto-release now strips existing type prefix and uses `` for packages +- CI: `updates_xml_build` was cascading entries for all lower channels on stable release — now writes only current channel +- CI: `targetplatform` regex `((5.[0-9])|(6.[0-9]))` caused Gitea 500 on XML render — simplified to `(5|6)\..*` +- updates.xml stable entry now has correct `stable` and download URL +- README slimmed to overview, detailed content moved to wiki + ## [02.03.10] - 2026-05-24 ### Added -- 2.52.0 From 625965e1291e3ca070cb664d3a5e9e776cc1fa6b Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Mon, 25 May 2026 19:22:05 -0500 Subject: [PATCH 02/11] fix(ci): use stream tag 'stable' instead of version tag 'vXX' Release tags should use update stream names (stable, development, release-candidate) not version-based tags (v02, v03). This aligns with the pre-release workflow which already uses stream tags. Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) --- .mokogitea/workflows/auto-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.mokogitea/workflows/auto-release.yml b/.mokogitea/workflows/auto-release.yml index f02823b8..159e9e91 100644 --- a/.mokogitea/workflows/auto-release.yml +++ b/.mokogitea/workflows/auto-release.yml @@ -96,9 +96,9 @@ jobs: fi MAJOR=$(echo "$VERSION" | cut -d. -f1) echo "version=${VERSION}" >> "$GITHUB_OUTPUT" - echo "release_tag=v${MAJOR}" >> "$GITHUB_OUTPUT" + echo "release_tag=stable" >> "$GITHUB_OUTPUT" echo "skip=false" >> "$GITHUB_OUTPUT" - echo "branch=version/${MAJOR}" >> "$GITHUB_OUTPUT" + echo "branch=main" >> "$GITHUB_OUTPUT" - name: "Step 1b: Bump version" id: bump -- 2.52.0 From a869619fcd6c9f4a4d5e0bbc5a470bcba703e80d Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Mon, 25 May 2026 19:58:52 -0500 Subject: [PATCH 03/11] feat: alias offline=No bypasses Joomla global offline setting When an alias domain has offline=No, the plugin overrides Joomla's configuration.php offline=1 setting. This allows the dev/staging alias to remain accessible while the main site shows the offline page. Use case: put clarksvillefurs.com offline for maintenance while clarksvillefurs.dev.mokoconsulting.tech stays accessible for testing. Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) --- CHANGELOG.md | 4 +++ .../Extension/MokoWaaS.php | 36 +++++++++++-------- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b353789b..47792ec0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added +- Alias offline bypass: aliases with offline=No override Joomla's global offline setting, allowing access via alias domain while main site is down +- CI: auto-release uses stream tag `stable` instead of version tag `vXX` + ### Planned - License/subscription check - System email template branding (DB approach) diff --git a/src/packages/plg_system_mokowaas/Extension/MokoWaaS.php b/src/packages/plg_system_mokowaas/Extension/MokoWaaS.php index 62e935b1..302b026a 100644 --- a/src/packages/plg_system_mokowaas/Extension/MokoWaaS.php +++ b/src/packages/plg_system_mokowaas/Extension/MokoWaaS.php @@ -2944,25 +2944,33 @@ class MokoWaaS extends CMSPlugin } // Offline: use Joomla's native offline mode for frontend requests - if (!empty($alias->offline) && (string) $alias->offline === '1' - && $this->app->isClient('site')) + if ($this->app->isClient('site')) { - // Allow health API to still respond - if ($this->app->input->get('mokowaas', '') !== '') + if (!empty($alias->offline) && (string) $alias->offline === '1') { - return; + // Allow health API to still respond + if ($this->app->input->get('mokowaas', '') !== '') + { + return; + } + + // Set custom offline message if provided + $message = $alias->offline_message ?? ''; + + if (!empty($message)) + { + $this->app->getConfig()->set('offline_message', $message); + } + + // Enable Joomla's native offline mode + $this->app->getConfig()->set('offline', 1); } - - // Set custom offline message if provided - $message = $alias->offline_message ?? ''; - - if (!empty($message)) + else { - $this->app->getConfig()->set('offline_message', $message); + // Alias is NOT offline — override Joomla's global offline setting + // This allows access via the alias domain even when the main site is offline + $this->app->getConfig()->set('offline', 0); } - - // Enable Joomla's native offline mode — renders through the template's offline.php - $this->app->getConfig()->set('offline', 1); } } -- 2.52.0 From 781266885f8bccb5d4d95bdc42cb9ef949c44c03 Mon Sep 17 00:00:00 2001 From: "gitea-actions[bot]" Date: Tue, 26 May 2026 00:59:09 +0000 Subject: [PATCH 04/11] chore(version): auto-bump patch 02.04.01 [skip ci] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 27d35286..b039a0cc 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ DEFGROUP: Joomla.Plugin INGROUP: MokoWaaS REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS - VERSION: 02.04.00 + VERSION: 02.04.01 PATH: /README.md BRIEF: MokoWaaS platform plugin for Joomla --> -- 2.52.0 From 72b967c0abf65e66c93875ef4fb969badee1674c Mon Sep 17 00:00:00 2001 From: "gitea-actions[bot]" Date: Tue, 26 May 2026 00:59:10 +0000 Subject: [PATCH 05/11] chore: update updates.xml (development: 02.04.01-dev) [skip ci] --- updates.xml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/updates.xml b/updates.xml index 59451d39..fe5a3f37 100644 --- a/updates.xml +++ b/updates.xml @@ -7,18 +7,20 @@ MokoWaaS - MokoWaaS update - mokowaas + MokoWaaS development build. + pkg_mokowaas package - 02.04.00-dev - development - https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS/releases/tag/development + 02.04.01 + 2026-05-26 + https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS/releases/tag/development - https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS/releases/download/development/pkg_mokowaas-02.04.00-dev.zip + https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS/releases/download/development/pkg_mokowaas-02.04.01-dev.zip - + 3bef5830de2aa7340c42ee2fc78f8fabd076bbffda2db1ac6574dcd9fdcea388 + development Moko Consulting https://mokoconsulting.tech + MokoWaaS -- 2.52.0 From 78dd453a9b68ec0b8f7e7e925c884bddfc1b7590 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Mon, 25 May 2026 20:01:14 -0500 Subject: [PATCH 06/11] chore: promote CHANGELOG for 02.06.00 release Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) --- CHANGELOG.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47792ec0..ae33759f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,14 +27,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -### Added -- Alias offline bypass: aliases with offline=No override Joomla's global offline setting, allowing access via alias domain while main site is down -- CI: auto-release uses stream tag `stable` instead of version tag `vXX` - ### Planned - License/subscription check - System email template branding (DB approach) +## [02.06.00] - 2026-05-25 + +### Added +- Alias offline bypass: aliases with offline=No override Joomla's global offline setting, allowing access via alias domain while main site is down + +### Changed +- CI: auto-release uses stream tag `stable` instead of version tag `vXX` + ## [02.05.00] - 2026-05-24 ### Added -- 2.52.0 From 906861638f8e29c5a69d553db1cf8631b466c66b Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Mon, 25 May 2026 20:03:47 -0500 Subject: [PATCH 07/11] fix: install API extracts ZIP before passing to Joomla Installer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Installer::install() expects a directory path, not a ZIP file. Now downloads → extracts to tmp dir → installs from extracted dir → cleans up. Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) --- CHANGELOG.md | 4 ++ .../Extension/MokoWaaS.php | 70 ++++++++++++++++++- 2 files changed, 72 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae33759f..c157731e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Alias offline bypass: aliases with offline=No override Joomla's global offline setting, allowing access via alias domain while main site is down +### Fixed +- Install API endpoint: extract ZIP to temp directory before passing to Joomla Installer (was passing ZIP path directly) +- Clean up extracted temp directory on success or failure + ### Changed - CI: auto-release uses stream tag `stable` instead of version tag `vXX` diff --git a/src/packages/plg_system_mokowaas/Extension/MokoWaaS.php b/src/packages/plg_system_mokowaas/Extension/MokoWaaS.php index 302b026a..f55e36a5 100644 --- a/src/packages/plg_system_mokowaas/Extension/MokoWaaS.php +++ b/src/packages/plg_system_mokowaas/Extension/MokoWaaS.php @@ -2747,11 +2747,36 @@ class MokoWaaS extends CMSPlugin file_put_contents($tmpFile, $zipData); + // Extract ZIP to temp directory + $extractDir = $this->app->getConfig()->get('tmp_path', JPATH_ROOT . '/tmp') + . '/mokowaas_extract_' . md5($url); + + if (is_dir($extractDir)) + { + $this->rmdirRecursive($extractDir); + } + + mkdir($extractDir, 0755, true); + + $zip = new \ZipArchive(); + + if ($zip->open($tmpFile) !== true) + { + @unlink($tmpFile); + $this->sendHealthResponse(500, ['error' => 'Failed to open ZIP']); + + return; + } + + $zip->extractTo($extractDir); + $zip->close(); + @unlink($tmpFile); + // Install using Joomla's installer $installer = \Joomla\CMS\Installer\Installer::getInstance(); - $result = $installer->install($tmpFile); + $result = $installer->install($extractDir); - @unlink($tmpFile); + $this->rmdirRecursive($extractDir); if ($result) { @@ -2774,6 +2799,11 @@ class MokoWaaS extends CMSPlugin { @unlink($tmpFile ?? ''); + if (!empty($extractDir) && is_dir($extractDir)) + { + $this->rmdirRecursive($extractDir); + } + $this->sendHealthResponse(500, [ 'error' => 'Install exception', 'message' => $e->getMessage(), @@ -2782,6 +2812,42 @@ class MokoWaaS extends CMSPlugin } } + /** + * Recursively remove a directory. + * + * @param string $dir Directory path + * + * @return void + * + * @since 02.06.00 + */ + protected function rmdirRecursive(string $dir): void + { + if (!is_dir($dir)) + { + return; + } + + $items = new \RecursiveIteratorIterator( + new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS), + \RecursiveIteratorIterator::CHILD_FIRST + ); + + foreach ($items as $item) + { + if ($item->isDir()) + { + rmdir($item->getPathname()); + } + else + { + unlink($item->getPathname()); + } + } + + rmdir($dir); + } + // ------------------------------------------------------------------ // Site Alias handling // ------------------------------------------------------------------ -- 2.52.0 From 7822064045d753575f98191921e1b9b29678d145 Mon Sep 17 00:00:00 2001 From: "gitea-actions[bot]" Date: Tue, 26 May 2026 01:03:59 +0000 Subject: [PATCH 08/11] chore(version): auto-bump patch 02.04.02 [skip ci] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b039a0cc..b871bee2 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ DEFGROUP: Joomla.Plugin INGROUP: MokoWaaS REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS - VERSION: 02.04.01 + VERSION: 02.04.02 PATH: /README.md BRIEF: MokoWaaS platform plugin for Joomla --> -- 2.52.0 From 3d8bfb6112014be4921cd797062335695c110d0d Mon Sep 17 00:00:00 2001 From: "gitea-actions[bot]" Date: Tue, 26 May 2026 01:03:59 +0000 Subject: [PATCH 09/11] chore: update updates.xml (development: 02.04.02-dev) [skip ci] --- updates.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/updates.xml b/updates.xml index fe5a3f37..59cba7c7 100644 --- a/updates.xml +++ b/updates.xml @@ -10,13 +10,13 @@ MokoWaaS development build. pkg_mokowaas package - 02.04.01 + 02.04.02 2026-05-26 https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS/releases/tag/development - https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS/releases/download/development/pkg_mokowaas-02.04.01-dev.zip + https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS/releases/download/development/pkg_mokowaas-02.04.02-dev.zip - 3bef5830de2aa7340c42ee2fc78f8fabd076bbffda2db1ac6574dcd9fdcea388 + fbf7cefd587be6e791a5b382ac4d89756c2199c89ccc4e52a11a762ed2e3604f development Moko Consulting https://mokoconsulting.tech -- 2.52.0 From 29cfee715488f32543068112037329bba771d0bf Mon Sep 17 00:00:00 2001 From: "gitea-actions[bot]" Date: Tue, 26 May 2026 01:11:49 +0000 Subject: [PATCH 10/11] chore(version): auto-bump patch 02.05.01 [skip ci] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b871bee2..3b6df394 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ DEFGROUP: Joomla.Plugin INGROUP: MokoWaaS REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS - VERSION: 02.04.02 + VERSION: 02.05.01 PATH: /README.md BRIEF: MokoWaaS platform plugin for Joomla --> -- 2.52.0 From c9d31b3ba4e7e35ff43a4ab3662a5ebcdb6abf7b Mon Sep 17 00:00:00 2001 From: "gitea-actions[bot]" Date: Tue, 26 May 2026 01:11:50 +0000 Subject: [PATCH 11/11] chore: update updates.xml (development: 02.05.01-dev) [skip ci] --- updates.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/updates.xml b/updates.xml index 59cba7c7..aacf3f24 100644 --- a/updates.xml +++ b/updates.xml @@ -10,13 +10,13 @@ MokoWaaS development build. pkg_mokowaas package - 02.04.02 + 02.05.01 2026-05-26 https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS/releases/tag/development - https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS/releases/download/development/pkg_mokowaas-02.04.02-dev.zip + https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS/releases/download/development/pkg_mokowaas-02.05.01-dev.zip - fbf7cefd587be6e791a5b382ac4d89756c2199c89ccc4e52a11a762ed2e3604f + e336a36a71cf9c42f8bf85cb3c4e250f68019cea581145ce3394f77c22dca79b development Moko Consulting https://mokoconsulting.tech -- 2.52.0