From 6094fef99eec758e943ecd502854a76cb09c8627 Mon Sep 17 00:00:00 2001 From: Jonathan Miller <230051081+jmiller-moko@users.noreply.github.com> Date: Tue, 7 Apr 2026 16:46:17 -0500 Subject: [PATCH 1/2] fix: README version to 02.01.04 Co-Authored-By: Claude Opus 4.6 (1M context) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7310cbc..bcdb04c 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ DEFGROUP: Joomla.Plugin INGROUP: MokoWaaS REPO: https://github.com/mokoconsulting-tech/mokowaas - VERSION: 02.01.01 + VERSION: 02.01.04 PATH: /README.md BRIEF: Rebranding plugin for MokoWaaS platform NOTE: Internal WaaS identity abstraction layer @@ -23,7 +23,7 @@ # MokoWaaS Plugin -[![Version](https://img.shields.io/badge/version-02.01.01-blue.svg)](https://github.com/mokoconsulting-tech/mokowaas) +[![Version](https://img.shields.io/badge/version-02.01.04-blue.svg)](https://github.com/mokoconsulting-tech/mokowaas) [![License](https://img.shields.io/badge/license-GPL--3.0--or--later-green.svg)](LICENSE.md) [![Joomla](https://img.shields.io/badge/Joomla-5.x%20%7C%206.x-orange.svg)](https://www.joomla.org) [![PHP](https://img.shields.io/badge/PHP-8.1%2B-blue.svg)](https://www.php.net) From acfecc383e58d4fe31444f1b3e315af3ed6b3d9c Mon Sep 17 00:00:00 2001 From: Jonathan Miller <230051081+jmiller-moko@users.noreply.github.com> Date: Tue, 7 Apr 2026 16:49:03 -0500 Subject: [PATCH 2/2] fix: use release zip from updates.xml for mokocassiopeia install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The release zip is properly structured for Joomla installation. Simplified extraction logic — release zips have templateDetails.xml at root or one level deep. Added better error messages with the failing URL for debugging. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/script.php | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/src/script.php b/src/script.php index 9e7130b..74b0ca0 100644 --- a/src/script.php +++ b/src/script.php @@ -262,7 +262,8 @@ class plgSystemMokoWaaSInstallerScript implements InstallerScriptInterface if (empty($zipUrl)) { Factory::getApplication()->enqueueMessage( - 'MokoCassiopeia: could not resolve download URL.', + 'MokoCassiopeia: could not resolve download URL ' + . 'from updates.xml.', 'warning' ); @@ -279,7 +280,7 @@ class plgSystemMokoWaaSInstallerScript implements InstallerScriptInterface if ($data === false) { Factory::getApplication()->enqueueMessage( - 'MokoCassiopeia not found and download failed.', + 'MokoCassiopeia download failed: ' . $zipUrl, 'warning' ); @@ -288,15 +289,15 @@ class plgSystemMokoWaaSInstallerScript implements InstallerScriptInterface file_put_contents($tmpFile, $data); - // Extract the zip + // Extract the release zip $archive = new \Joomla\Archive\Archive(); $archive->extract($tmpFile, $tmpDir); - // Find the extracted folder (may be nested) + // Release zips should have templateDetails.xml at root + // or one level deep $installDir = $tmpDir; - $xmlFiles = glob($tmpDir . '/templateDetails.xml'); - if (empty($xmlFiles)) + if (!file_exists($tmpDir . '/templateDetails.xml')) { $xmlFiles = glob($tmpDir . '/*/templateDetails.xml'); @@ -304,17 +305,26 @@ class plgSystemMokoWaaSInstallerScript implements InstallerScriptInterface { $installDir = dirname($xmlFiles[0]); } + else + { + Factory::getApplication()->enqueueMessage( + 'MokoCassiopeia: templateDetails.xml not ' + . 'found in archive.', + 'warning' + ); + + return; + } } $installer = \Joomla\CMS\Installer\Installer::getInstance(); if ($installer->install($installDir)) { - // Lock after install $this->ensureMokoCassiopeia(); Factory::getApplication()->enqueueMessage( - 'MokoCassiopeia template installed and locked.', + 'MokoCassiopeia installed and locked.', 'message' ); } @@ -329,8 +339,7 @@ class plgSystemMokoWaaSInstallerScript implements InstallerScriptInterface catch (\Exception $e) { Factory::getApplication()->enqueueMessage( - 'MokoCassiopeia install error: ' - . $e->getMessage(), + 'MokoCassiopeia error: ' . $e->getMessage(), 'warning' ); }