Compare commits

...

2 Commits

Author SHA1 Message Date
gitea-actions[bot] a1326cccdf chore(version): pre-release bump to 02.52.17-dev [skip ci] 2026-06-30 18:53:26 +00:00
jmiller 8533eff1f5 fix: dual heartbeat endpoint, menu icons/levels, SQL uninstall cleanup
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 17s
- Heartbeat sends to both primary and secondary HQ URLs
- Added 10 missing repo icons to admin sidebar menu
- Fixed CSS level classes (item-level-2/3 instead of 1/2)
- Uninstall SQL now drops all 19 tables in FK-safe order

Claude-Session: https://claude.ai/code/session_01Jo2JpjCwfHAh2HHRSjczKq
2026-06-30 13:52:36 -05:00
46 changed files with 193 additions and 119 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
# FILE INFORMATION
# DEFGROUP: Gitea.Workflow
# INGROUP: moko-platform.Automation
# VERSION: 02.52.11
# VERSION: 02.52.17
# BRIEF: Auto-create feature branch when an issue is opened
name: "Universal: Issue Branch"
+5 -1
View File
@@ -14,7 +14,7 @@
INGROUP: MokoSuiteClient.Documentation
REPO: https://github.com/mokoconsulting-tech/mokosuiteclient
PATH: ./CHANGELOG.md
VERSION: 02.52.11
VERSION: 02.52.17
BRIEF: Version history using `Keep a Changelog`
-->
@@ -22,6 +22,7 @@
## [Unreleased]
### Added
- **Dual heartbeat endpoint** — heartbeat now sends to both primary (suite.dev.mokoconsulting.tech) and secondary (mokoconsulting.tech) HQ instances; configurable via plugin settings
- **Mirror Domains & Staging** — repeatable subform table in DevTools plugin for configuring domain aliases with per-alias offline bypass, robots directive, and labels
- **Daily Support PIN** — HMAC-SHA256 rotating PIN shown on cpanel module, component dashboard, and HQ site cards
- **Support PIN in status bar** — cache/temp module now shows PIN request button instead of domain; click to request, click again to copy
@@ -64,6 +65,9 @@
- **Update server migration** — removed migrateUpdateServerUrls, cleanupStaleUpdateSites, fixUpdateRecords, enableUpdateServer calls
### Fixed
- **SQL uninstall** — uninstall.mysql.sql was missing 13 of 19 tables (conditions, snippets, replacements, templates, license cache, ticket subtables); now drops all in FK-safe order
- **Admin menu CSS levels** — sidebar components now use item-level-2/level-3 instead of item-level-1/level-2, matching Joomla's nesting model
- **Admin menu icons** — added icons for 10 new repos (Rental, Resto, Booking, Gym, Church, Marina, Storage, Logistics, Nonprofit, Taxi)
- **Regular Labs import** — destination tables missing from SQL update files; sites that upgraded never got the tables, causing "No data found" on import
- **Regular Labs import banner** — detection now requires both source AND destination tables before showing the import button
- **DB-IP auto-enrichment** — all IPs in `<code>` tags in admin backend now show country flag emoji and geo tooltip on hover
+1 -1
View File
@@ -14,7 +14,7 @@
DEFGROUP: Joomla.Plugin
INGROUP: MokoSuiteClient.Documentation
REPO: https://github.com/mokoconsulting-tech/mokosuiteclient
VERSION: 02.52.11
VERSION: 02.52.17
PATH: ./CODE_OF_CONDUCT.md
BRIEF: Reference + packaging repo for Moko Consulting Developer GPT Other Default
-->
+1 -1
View File
@@ -19,7 +19,7 @@
DEFGROUP: mokoconsulting-tech.MokoSuiteClientBrand
INGROUP: MokoStandards.Governance
REPO: https://github.com/mokoconsulting-tech/MokoSuiteClientBrand
VERSION: 02.52.11
VERSION: 02.52.17
PATH: /GOVERNANCE.md
BRIEF: Project governance rules, roles, and decision process for MokoSuiteClientBrand
-->
+1 -1
View File
@@ -15,7 +15,7 @@
INGROUP: MokoSuiteClient.Documentation
REPO: https://github.com/mokoconsulting-tech/mokosuiteclient
PATH: ./LICENSE.md
VERSION: 02.52.11
VERSION: 02.52.17
BRIEF: Project license (GPL-3.0-or-later)
-->
GNU GENERAL PUBLIC LICENSE
+1 -1
View File
@@ -9,7 +9,7 @@
DEFGROUP: Joomla.Plugin
INGROUP: MokoSuiteClient
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteClient
VERSION: 02.52.11
VERSION: 02.52.17
PATH: /README.md
BRIEF: MokoSuiteClient platform plugin for Joomla
-->
+1 -1
View File
@@ -23,7 +23,7 @@ DEFGROUP: [PROJECT_NAME]
INGROUP: [PROJECT_NAME].Documentation
REPO: [REPOSITORY_URL]
PATH: /SECURITY.md
VERSION: 02.52.11
VERSION: 02.52.17
BRIEF: Security vulnerability reporting and handling policy
-->
+2 -2
View File
@@ -11,13 +11,13 @@
INGROUP: MokoSuiteClient.Build
REPO: https://github.com/mokoconsulting-tech/mokosuiteclient
FILE: build-guide.md
VERSION: 02.52.11
VERSION: 02.52.17
PATH: /docs/guides/
BRIEF: Build and packaging guide for the MokoSuiteClient system plugin
NOTE: Defines environment setup, repository layout, packaging rules, and release preparation
-->
# MokoSuiteClient Build Guide (VERSION: 02.52.11)
# MokoSuiteClient Build Guide (VERSION: 02.52.17)
## 1. Purpose
+2 -2
View File
@@ -10,13 +10,13 @@
DEFGROUP: Joomla.Plugin
INGROUP: MokoSuiteClient.Guides
REPO: https://github.com/mokoconsulting-tech/mokosuiteclient
VERSION: 02.52.11
VERSION: 02.52.17
PATH: /docs/guides/configuration-guide.md
BRIEF: Configuration guide for the MokoSuiteClient system plugin
NOTE: Defines plugin parameters, expected behaviors, and recommended defaults
-->
# MokoSuiteClient Configuration Guide (VERSION: 02.52.11)
# MokoSuiteClient Configuration Guide (VERSION: 02.52.17)
## 1. Objective
+2 -2
View File
@@ -10,13 +10,13 @@
DEFGROUP: Joomla.Plugin
INGROUP: MokoSuiteClient.Guides
REPO: https://github.com/mokoconsulting-tech/mokosuiteclient
VERSION: 02.52.11
VERSION: 02.52.17
PATH: /docs/guides/installation-guide.md
BRIEF: Installation guide for the MokoSuiteClient system plugin
NOTE: First document in the guide set
-->
# MokoSuiteClient Installation Guide (VERSION: 02.52.11)
# MokoSuiteClient Installation Guide (VERSION: 02.52.17)
## Introduction
+2 -2
View File
@@ -10,13 +10,13 @@
DEFGROUP: Joomla.Plugin
INGROUP: MokoSuiteClient.Guides
REPO: https://github.com/mokoconsulting-tech/mokosuiteclient
VERSION: 02.52.11
VERSION: 02.52.17
PATH: /docs/guides/operations-guide.md
BRIEF: Operational guide for administering and managing the MokoSuiteClient system plugin
NOTE: Defines lifecycle, responsibilities, and operational behaviors
-->
# MokoSuiteClient Operations Guide (VERSION: 02.52.11)
# MokoSuiteClient Operations Guide (VERSION: 02.52.17)
## Introduction
+2 -2
View File
@@ -10,13 +10,13 @@
DEFGROUP: Joomla.Plugin
INGROUP: MokoSuiteClient.Guides
REPO: https://github.com/mokoconsulting-tech/mokosuiteclient
VERSION: 02.52.11
VERSION: 02.52.17
PATH: /docs/guides/rollback-and-recovery-guide.md
BRIEF: Rollback and recovery guide for restoring stable operation after plugin related incidents
NOTE: Completes the core guide set for Suite plugin governance
-->
# MokoSuiteClient Rollback and Recovery Guide (VERSION: 02.52.11)
# MokoSuiteClient Rollback and Recovery Guide (VERSION: 02.52.17)
## Introduction
+2 -2
View File
@@ -7,13 +7,13 @@
DEFGROUP: Joomla.Plugin
INGROUP: MokoSuiteClient.Guides
REPO: https://github.com/mokoconsulting-tech/mokosuiteclient
VERSION: 02.52.11
VERSION: 02.52.17
PATH: /docs/guides/testing-guide.md
BRIEF: Testing guide for MokoSuiteClient v02.01.08
NOTE: Covers manual test procedures for language overrides, install/uninstall, and configuration
-->
# MokoSuiteClient Testing Guide (VERSION: 02.52.11)
# MokoSuiteClient Testing Guide (VERSION: 02.52.17)
## 1. Prerequisites
+2 -2
View File
@@ -10,13 +10,13 @@
DEFGROUP: Joomla.Plugin
INGROUP: MokoSuiteClient.Guides
REPO: https://github.com/mokoconsulting-tech/mokosuiteclient
VERSION: 02.52.11
VERSION: 02.52.17
PATH: /docs/guides/troubleshooting-guide.md
BRIEF: Troubleshooting guide for diagnosing and resolving issues related to the MokoSuiteClient plugin
NOTE: Designed for administrators and Suite operations teams
-->
# MokoSuiteClient Troubleshooting Guide (VERSION: 02.52.11)
# MokoSuiteClient Troubleshooting Guide (VERSION: 02.52.17)
## Introduction
+2 -2
View File
@@ -10,13 +10,13 @@
DEFGROUP: Joomla.Plugin
INGROUP: MokoSuiteClient.Guides
REPO: https://github.com/mokoconsulting-tech/mokosuiteclient
VERSION: 02.52.11
VERSION: 02.52.17
PATH: /docs/guides/upgrade-and-versioning-guide.md
BRIEF: Guide for updating, versioning, and maintaining the MokoSuiteClient plugin
NOTE: Defines release flow, version rules, and upgrade validation
-->
# MokoSuiteClient Upgrade and Versioning Guide (VERSION: 02.52.11)
# MokoSuiteClient Upgrade and Versioning Guide (VERSION: 02.52.17)
## Introduction
+2 -2
View File
@@ -10,13 +10,13 @@
DEFGROUP: Joomla.Plugin
INGROUP: MokoSuiteClient.Documentation
REPO: https://github.com/mokoconsulting-tech/mokosuiteclient
VERSION: 02.52.11
VERSION: 02.52.17
PATH: /docs/index.md
BRIEF: Master index of all documentation for the MokoSuiteClient plugin
NOTE: Automatically maintained index for all guide canvases
-->
# MokoSuiteClient Documentation Index (VERSION: 02.52.11)
# MokoSuiteClient Documentation Index (VERSION: 02.52.17)
## Introduction
+2 -2
View File
@@ -11,12 +11,12 @@
INGROUP: MokoSuiteClient
REPO: https://github.com/mokoconsulting-tech/mokosuiteclient
PATH: /docs/plugin-basic.md
VERSION: 02.52.11
VERSION: 02.52.17
BRIEF: Baseline documentation for the MokoSuiteClient system plugin
NOTE: Foundational reference for internal and external stakeholders
-->
# MokoSuiteClient Plugin Overview (VERSION: 02.52.11)
# MokoSuiteClient Plugin Overview (VERSION: 02.52.17)
## Introduction
+1 -1
View File
@@ -10,7 +10,7 @@ DEFGROUP: MokoSuiteClient.Documentation
INGROUP: MokoStandards.Templates
REPO: https://github.com/mokoconsulting-tech/MokoSuiteClient
PATH: /docs/update-server.md
VERSION: 02.52.11
VERSION: 02.52.17
BRIEF: How this extension's Joomla update server file (update.xml) is managed
-->
@@ -1,13 +1,39 @@
--
-- MokoSuiteClient component uninstall — drop all tables
-- Order: children first to respect FK dependencies
--
DROP TABLE IF EXISTS `#__mokosuiteclient_download_keys`;
-- Ticket system (children first)
DROP TABLE IF EXISTS `#__mokosuiteclient_ticket_attachments`;
DROP TABLE IF EXISTS `#__mokosuiteclient_ticket_replies`;
DROP TABLE IF EXISTS `#__mokosuiteclient_ticket_assignees`;
DROP TABLE IF EXISTS `#__mokosuiteclient_ticket_category_field_groups`;
DROP TABLE IF EXISTS `#__mokosuiteclient_ticket_canned`;
DROP TABLE IF EXISTS `#__mokosuiteclient_ticket_automation`;
DROP TABLE IF EXISTS `#__mokosuiteclient_tickets`;
DROP TABLE IF EXISTS `#__mokosuiteclient_ticket_statuses`;
DROP TABLE IF EXISTS `#__mokosuiteclient_ticket_priorities`;
DROP TABLE IF EXISTS `#__mokosuiteclient_ticket_categories`;
-- Privacy Guard
DROP TABLE IF EXISTS `#__mokosuiteclient_retention_policies`;
DROP TABLE IF EXISTS `#__mokosuiteclient_data_requests`;
DROP TABLE IF EXISTS `#__mokosuiteclient_consent_log`;
-- Conditions engine
DROP TABLE IF EXISTS `#__mokosuiteclient_conditions_map`;
DROP TABLE IF EXISTS `#__mokosuiteclient_conditions_rules`;
DROP TABLE IF EXISTS `#__mokosuiteclient_conditions_groups`;
DROP TABLE IF EXISTS `#__mokosuiteclient_conditions`;
-- Content tools
DROP TABLE IF EXISTS `#__mokosuiteclient_snippets`;
DROP TABLE IF EXISTS `#__mokosuiteclient_replacements`;
DROP TABLE IF EXISTS `#__mokosuiteclient_content_templates`;
-- License cache
DROP TABLE IF EXISTS `#__mokosuite_license_cache`;
-- Legacy cleanup
DROP TABLE IF EXISTS `#__mokosuiteclient_download_keys`;
DROP TABLE IF EXISTS `#__mokosuiteclient_waf_log`;
DROP TABLE IF EXISTS `#__mokosuiteclient_ticket_automation`;
DROP TABLE IF EXISTS `#__mokosuiteclient_ticket_canned`;
DROP TABLE IF EXISTS `#__mokosuiteclient_ticket_replies`;
DROP TABLE IF EXISTS `#__mokosuiteclient_tickets`;
DROP TABLE IF EXISTS `#__mokosuiteclient_ticket_categories`;
@@ -20,7 +20,7 @@
<license>GPL-3.0-or-later</license>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
<authorUrl>https://mokoconsulting.tech</authorUrl>
<version>02.52.11</version>
<version>02.52.17</version>
<description>MokoSuiteClient admin dashboard and REST API. Provides a control panel for managing MokoSuiteClient feature plugins, site health monitoring, and remote management endpoints.</description>
<namespace path="src">Moko\Component\MokoSuiteClient</namespace>
@@ -7,7 +7,7 @@
<license>GPL-3.0-or-later</license>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
<authorUrl>https://mokoconsulting.tech</authorUrl>
<version>02.52.11</version>
<version>02.52.17</version>
<description>MOD_MOKOSUITECLIENT_CACHE_DESC</description>
<namespace path="src">Moko\Module\MokoSuiteClientCache</namespace>
@@ -7,7 +7,7 @@
<license>GPL-3.0-or-later</license>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
<authorUrl>https://mokoconsulting.tech</authorUrl>
<version>02.52.11</version>
<version>02.52.17</version>
<description>MOD_MOKOSUITECLIENT_CATEGORIES_DESC</description>
<namespace path="src">Moko\Module\MokoSuiteClientCategories</namespace>
@@ -7,7 +7,7 @@
<license>GPL-3.0-or-later</license>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
<authorUrl>https://mokoconsulting.tech</authorUrl>
<version>02.52.11</version>
<version>02.52.17</version>
<description>MOD_MOKOSUITECLIENT_CPANEL_DESC</description>
<namespace path="src">Moko\Module\MokoSuiteClientCpanel</namespace>
@@ -7,7 +7,7 @@
<license>GPL-3.0-or-later</license>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
<authorUrl>https://mokoconsulting.tech</authorUrl>
<version>02.52.11</version>
<version>02.52.17</version>
<description>MokoSuiteClient admin sidebar menu — renders a dedicated MokoSuiteClient section in the admin menu before Joomla's default menu.</description>
<namespace path="src">Moko\Module\MokoSuiteClientMenu</namespace>
@@ -76,6 +76,15 @@ $iconOverrides = [
'com_mokosuiterealty' => 'icon-home',
'com_mokosuitesupport' => 'icon-life-ring',
'com_mokosuitetaxi' => 'icon-taxi',
'com_mokosuiterental' => 'icon-key',
'com_mokosuiteresto' => 'icon-utensils',
'com_mokosuitebooking' => 'icon-calendar-check',
'com_mokosuitegym' => 'icon-dumbbell',
'com_mokosuitechurch' => 'icon-church',
'com_mokosuitemarina' => 'icon-anchor',
'com_mokosuitestorage' => 'icon-boxes',
'com_mokosuitelogistics' => 'icon-truck',
'com_mokosuitenonprofit' => 'icon-hand-holding-heart',
];
$childIconMap = [
@@ -280,7 +289,7 @@ $iconStyle = 'display:inline-block!important;width:1.25em;text-align:center;marg
$hasChildren = !empty($comp['children']);
?>
<?php if ($hasChildren): ?>
<li class="item parent item-level-1 mokosuiteclient-ext-item<?php echo $compActive ? ' mm-active' : ''; ?>">
<li class="item parent item-level-2 mokosuiteclient-ext-item<?php echo $compActive ? ' mm-active' : ''; ?>">
<a class="has-arrow<?php echo $compActive ? ' mm-active' : ''; ?>" href="#">
<span class="<?php echo htmlspecialchars($comp['icon'], ENT_QUOTES, 'UTF-8'); ?>" aria-hidden="true" style="<?php echo $iconStyle; ?>"></span>
<span class="sidebar-item-title"><?php echo htmlspecialchars($comp['title'], ENT_QUOTES, 'UTF-8'); ?></span>
@@ -300,7 +309,7 @@ $iconStyle = 'display:inline-block!important;width:1.25em;text-align:center;marg
: ($currentView === $childView);
}
?>
<li class="item item-level-2 mokosuiteclient-ext-child<?php echo $childActive ? ' mm-active' : ''; ?>">
<li class="item item-level-3 mokosuiteclient-ext-child<?php echo $childActive ? ' mm-active' : ''; ?>">
<a class="no-dropdown<?php echo $childActive ? ' mm-active' : ''; ?>" href="<?php echo Route::_($child['link']); ?>"<?php echo $childActive ? ' aria-current="page"' : ''; ?>>
<span class="<?php echo htmlspecialchars($child['icon'], ENT_QUOTES, 'UTF-8'); ?>" aria-hidden="true" style="<?php echo $iconStyle; ?>"></span>
<span class="sidebar-item-title"><?php echo htmlspecialchars($child['title'], ENT_QUOTES, 'UTF-8'); ?></span>
@@ -310,7 +319,7 @@ $iconStyle = 'display:inline-block!important;width:1.25em;text-align:center;marg
</ul>
</li>
<?php else: ?>
<li class="item item-level-1 mokosuiteclient-ext-item<?php echo $compActive ? ' mm-active' : ''; ?>">
<li class="item item-level-2 mokosuiteclient-ext-item<?php echo $compActive ? ' mm-active' : ''; ?>">
<a class="no-dropdown<?php echo $compActive ? ' mm-active' : ''; ?>" href="<?php echo Route::_($comp['link']); ?>"<?php echo $compActive ? ' aria-current="page"' : ''; ?>>
<span class="<?php echo htmlspecialchars($comp['icon'], ENT_QUOTES, 'UTF-8'); ?>" aria-hidden="true" style="<?php echo $iconStyle; ?>"></span>
<span class="sidebar-item-title"><?php echo htmlspecialchars($comp['title'], ENT_QUOTES, 'UTF-8'); ?></span>
@@ -22,7 +22,7 @@
* DEFGROUP: Joomla.Plugin
* INGROUP: MokoSuiteClient
* REPO: https://github.com/mokoconsulting-tech/mokosuiteclient
* VERSION: 02.52.11
* VERSION: 02.52.17
* PATH: /src/Extension/MokoSuiteClient.php
* NOTE: Core system plugin for MokoSuiteClient admin tools suite
*/
@@ -2616,29 +2616,9 @@ class MokoSuiteClient extends CMSPlugin implements BootableExtensionInterface
*/
private function sendRuntimeHeartbeat(): void
{
$baseUrl = rtrim($this->params->get('monitor_base_url', ''), '/');
$baseUrls = $this->resolveHeartbeatUrls();
// Fall back to manifest XML default
if (empty($baseUrl))
{
$manifestFile = JPATH_PLUGINS . '/system/mokosuiteclient/mokosuiteclient.xml';
if (is_file($manifestFile))
{
$xml = simplexml_load_file($manifestFile);
if ($xml)
{
foreach ($xml->xpath('//field[@name="monitor_base_url"]') as $field)
{
$baseUrl = rtrim((string) $field['default'], '/');
break;
}
}
}
}
if (empty($baseUrl))
if (empty($baseUrls))
{
return;
}
@@ -2713,53 +2693,100 @@ class MokoSuiteClient extends CMSPlugin implements BootableExtensionInterface
$headers[] = 'X-MokoSuite-Timestamp: ' . $timestamp;
}
$endpoint = $baseUrl . '/api/index.php/v1/mokosuitehq/heartbeat';
$json = json_encode($payload, JSON_UNESCAPED_SLASHES);
$json = json_encode($payload, JSON_UNESCAPED_SLASHES);
try
$http = \Joomla\CMS\Http\HttpFactory::getHttp(
new \Joomla\Registry\Registry(['follow_location' => true, 'transport.curl' => ['certpath' => false]]),
['curl', 'stream']
);
$headerMap = [];
foreach ($headers as $h)
{
$http = \Joomla\CMS\Http\HttpFactory::getHttp(
new \Joomla\Registry\Registry(['follow_location' => true, 'transport.curl' => ['certpath' => false]]),
['curl', 'stream']
);
[$key, $val] = explode(': ', $h, 2);
$headerMap[$key] = $val;
}
$headerMap = [];
foreach ($baseUrls as $baseUrl)
{
$endpoint = $baseUrl . '/api/index.php/v1/mokosuitehq/heartbeat';
foreach ($headers as $h)
try
{
[$key, $val] = explode(': ', $h, 2);
$headerMap[$key] = $val;
}
$response = $http->post($endpoint, $json, $headerMap, 15);
$response = $http->post($endpoint, $json, $headerMap, 15);
if ($response->code >= 200 && $response->code < 300)
{
$body = json_decode($response->body, true);
if (!empty($body['config']['support_pin_hours']))
if ($response->code >= 200 && $response->code < 300)
{
$this->syncHqConfig('support_pin_hours', (int) $body['config']['support_pin_hours']);
}
$body = json_decode($response->body, true);
$this->app->enqueueMessage('MokoSuiteHQ heartbeat: site registered successfully.', 'message');
if (!empty($body['config']['support_pin_hours']))
{
$this->syncHqConfig('support_pin_hours', (int) $body['config']['support_pin_hours']);
}
$host = parse_url($baseUrl, PHP_URL_HOST) ?: $baseUrl;
$this->app->enqueueMessage("MokoSuiteHQ heartbeat ({$host}): site registered successfully.", 'message');
}
else
{
$body = json_decode($response->body, true);
$msg = $body['error'] ?? $body['message'] ?? ('HTTP ' . $response->code);
$host = parse_url($baseUrl, PHP_URL_HOST) ?: $baseUrl;
Log::add(
\sprintf('Heartbeat %s HTTP %d: %s', $host, $response->code, $response->body),
Log::WARNING,
'mokosuiteclient'
);
$this->app->enqueueMessage("MokoSuiteHQ heartbeat ({$host}) failed: " . $msg, 'warning');
}
}
else
catch (\Throwable $e)
{
$body = json_decode($response->body, true);
$msg = $body['error'] ?? $body['message'] ?? ('HTTP ' . $response->code);
Log::add(
\sprintf('Heartbeat HTTP %d: %s', $response->code, $response->body),
Log::WARNING,
'mokosuiteclient'
);
$this->app->enqueueMessage('MokoSuiteHQ heartbeat failed: ' . $msg, 'warning');
$host = parse_url($baseUrl, PHP_URL_HOST) ?: $baseUrl;
Log::add("Heartbeat {$host} failed: " . $e->getMessage(), Log::WARNING, 'mokosuiteclient');
}
}
catch (\Throwable $e)
}
private function resolveHeartbeatUrls(): array
{
$urls = [];
$primary = rtrim($this->params->get('monitor_base_url', ''), '/');
if (empty($primary))
{
Log::add('Heartbeat failed: ' . $e->getMessage(), Log::WARNING, 'mokosuiteclient');
$manifestFile = JPATH_PLUGINS . '/system/mokosuiteclient/mokosuiteclient.xml';
if (is_file($manifestFile))
{
$xml = simplexml_load_file($manifestFile);
if ($xml)
{
foreach ($xml->xpath('//field[@name="monitor_base_url"]') as $field)
{
$primary = rtrim((string) $field['default'], '/');
break;
}
}
}
}
if (!empty($primary))
{
$urls[] = $primary;
}
$secondary = rtrim($this->params->get('monitor_base_url_secondary', ''), '/');
if (!empty($secondary) && $secondary !== $primary)
{
$urls[] = $secondary;
}
return $urls;
}
private function syncHqConfig(string $key, $value): void
@@ -8,7 +8,7 @@
* FILE INFORMATION
* DEFGROUP: Joomla.Plugin
* INGROUP: MokoSuiteClient
* VERSION: 02.52.11
* VERSION: 02.52.17
* PATH: /src/Field/ArticlesField.php
* BRIEF: List field that populates with published Joomla articles
*/
@@ -8,7 +8,7 @@
* FILE INFORMATION
* DEFGROUP: Joomla.Plugin
* INGROUP: MokoSuiteClient
* VERSION: 02.52.11
* VERSION: 02.52.17
* PATH: /src/Field/CopyableTokenField.php
* BRIEF: Read-only token field with a copy-to-clipboard button
*/
@@ -45,5 +45,7 @@ PLG_SYSTEM_MOKOSUITECLIENT_FIELDSET_MONITOR_LABEL="Heartbeat Monitor"
PLG_SYSTEM_MOKOSUITECLIENT_FIELDSET_MONITOR_DESC="Settings for the MokoSuiteClientHQ heartbeat registration."
PLG_SYSTEM_MOKOSUITECLIENT_HEARTBEAT_LABEL="Enable Heartbeat"
PLG_SYSTEM_MOKOSUITECLIENT_HEARTBEAT_DESC="Send heartbeat data to MokoSuiteClientHQ on install, update, and admin login."
PLG_SYSTEM_MOKOSUITECLIENT_MONITOR_BASE_URL_LABEL="HQ Base URL"
PLG_SYSTEM_MOKOSUITECLIENT_MONITOR_BASE_URL_DESC="Base URL of the MokoSuiteClientHQ instance that receives heartbeat data."
PLG_SYSTEM_MOKOSUITECLIENT_MONITOR_BASE_URL_LABEL="HQ Base URL (Primary)"
PLG_SYSTEM_MOKOSUITECLIENT_MONITOR_BASE_URL_DESC="Primary base URL of the MokoSuiteHQ instance that receives heartbeat data."
PLG_SYSTEM_MOKOSUITECLIENT_MONITOR_BASE_URL_SECONDARY_LABEL="HQ Base URL (Secondary)"
PLG_SYSTEM_MOKOSUITECLIENT_MONITOR_BASE_URL_SECONDARY_DESC="Secondary base URL to also receive heartbeat data. Leave empty to disable."
@@ -30,7 +30,7 @@
<license>GNU General Public License version 3 or later; see LICENSE.md</license>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
<authorUrl>https://mokoconsulting.tech</authorUrl>
<version>02.52.11</version>
<version>02.52.17</version>
<description>MokoSuiteClient core system plugin — coordinates feature plugins, heartbeat, health checks, and admin customizations.</description>
<namespace path=".">Moko\Plugin\System\MokoSuiteClient</namespace>
<scriptfile>script.php</scriptfile>
@@ -99,6 +99,12 @@
description="PLG_SYSTEM_MOKOSUITECLIENT_MONITOR_BASE_URL_DESC"
filter="url" />
<field name="monitor_base_url_secondary" type="url"
default="https://mokoconsulting.tech"
label="PLG_SYSTEM_MOKOSUITECLIENT_MONITOR_BASE_URL_SECONDARY_LABEL"
description="PLG_SYSTEM_MOKOSUITECLIENT_MONITOR_BASE_URL_SECONDARY_DESC"
filter="url" />
<field name="auto_clear_cache" type="radio" default="0"
label="Auto-Clear Cache on Save"
description="Automatically clear Joomla cache when articles, modules, or extensions are saved."
@@ -22,7 +22,7 @@
* DEFGROUP: Joomla.Plugin
* INGROUP: MokoSuiteClient
* REPO: https://github.com/mokoconsulting-tech/mokosuiteclient
* VERSION: 02.52.11
* VERSION: 02.52.17
* PATH: /src/script.php
* BRIEF: Installation script for MokoSuiteClient plugin
* NOTE: Handles installation, update, and uninstallation tasks including language override deployment
@@ -22,7 +22,7 @@
* DEFGROUP: Joomla.Plugin
* INGROUP: MokoSuiteClient
* REPO: https://github.com/mokoconsulting-tech/mokosuiteclient
* VERSION: 02.52.11
* VERSION: 02.52.17
* PATH: /src/services/provider.php
* BRIEF: Service provider for dependency injection in Joomla 5.x
* NOTE: Registers the plugin with Joomla's DI container
@@ -8,7 +8,7 @@
<license>GPL-3.0-or-later</license>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
<authorUrl>https://mokoconsulting.tech</authorUrl>
<version>02.52.11</version>
<version>02.52.17</version>
<description>PLG_SYSTEM_MOKOSUITECLIENT_BACKUP_DESC</description>
<namespace path="src">Moko\Plugin\System\MokoSuiteClientBackup</namespace>
@@ -8,7 +8,7 @@
<license>GPL-3.0-or-later</license>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
<authorUrl>https://mokoconsulting.tech</authorUrl>
<version>02.52.11</version>
<version>02.52.17</version>
<description>PLG_SYSTEM_MOKOSUITECLIENT_DBIP_DESC</description>
<namespace path="src">Moko\Plugin\System\MokoSuiteClientDBIP</namespace>
@@ -8,7 +8,7 @@
<license>GPL-3.0-or-later</license>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
<authorUrl>https://mokoconsulting.tech</authorUrl>
<version>02.52.11</version>
<version>02.52.17</version>
<description>PLG_SYSTEM_MOKOSUITECLIENT_DEVTOOLS_DESC</description>
<namespace path="src">Moko\Plugin\System\MokoSuiteClientDevTools</namespace>
@@ -8,7 +8,7 @@
<license>GPL-3.0-or-later</license>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
<authorUrl>https://mokoconsulting.tech</authorUrl>
<version>02.52.11</version>
<version>02.52.17</version>
<description>PLG_SYSTEM_MOKOSUITECLIENT_FIREWALL_DESC</description>
<namespace path="src">Moko\Plugin\System\MokoSuiteClientFirewall</namespace>
@@ -8,7 +8,7 @@
<license>GPL-3.0-or-later</license>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
<authorUrl>https://mokoconsulting.tech</authorUrl>
<version>02.52.11</version>
<version>02.52.17</version>
<description>PLG_SYSTEM_MOKOSUITECLIENT_LICENSE_DESC</description>
<namespace path="src">Moko\Plugin\System\MokoSuiteClientLicense</namespace>
<files><folder>src</folder><folder>services</folder><folder>language</folder></files>
@@ -8,7 +8,7 @@
<license>GPL-3.0-or-later</license>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
<authorUrl>https://mokoconsulting.tech</authorUrl>
<version>02.52.11</version>
<version>02.52.17</version>
<description>PLG_SYSTEM_MOKOSUITECLIENT_OFFLINE_DESC</description>
<namespace path="src">Moko\Plugin\System\MokoSuiteClientOffline</namespace>
@@ -8,7 +8,7 @@
<license>GPL-3.0-or-later</license>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
<authorUrl>https://mokoconsulting.tech</authorUrl>
<version>02.52.11</version>
<version>02.52.17</version>
<description>PLG_SYSTEM_MOKOSUITECLIENT_TENANT_DESC</description>
<namespace path="src">Moko\Plugin\System\MokoSuiteClientTenant</namespace>
@@ -12,7 +12,7 @@
<license>GNU General Public License version 3 or later; see LICENSE</license>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
<authorUrl>https://mokoconsulting.tech</authorUrl>
<version>02.52.11</version>
<version>02.52.17</version>
<description>PLG_TASK_MOKOSUITECLIENTDEMO_DESC</description>
<namespace path="src">Moko\Plugin\Task\MokoSuiteClientDemo</namespace>
@@ -10,7 +10,7 @@
* INGROUP: MokoSuiteClient
* REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteClient
* PATH: /src/packages/plg_system_mokosuiteclient/Service/DemoResetService.php
* VERSION: 02.52.11
* VERSION: 02.52.17
* BRIEF: Content-only snapshot/restore for demo site reset
*/
@@ -12,7 +12,7 @@
<license>GNU General Public License version 3 or later; see LICENSE</license>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
<authorUrl>https://mokoconsulting.tech</authorUrl>
<version>02.52.11</version>
<version>02.52.17</version>
<description>PLG_TASK_MOKOSUITECLIENTSYNC_DESC</description>
<namespace path="src">Moko\Plugin\Task\MokoSuiteClientSync</namespace>
@@ -10,7 +10,7 @@
* INGROUP: MokoSuiteClient
* REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteClient
* PATH: /src/packages/plg_system_mokosuiteclient/Service/ContentSyncReceiver.php
* VERSION: 02.52.11
* VERSION: 02.52.17
* BRIEF: Receiver-side content sync — applies incoming payload to local DB
*/
@@ -10,7 +10,7 @@
* INGROUP: MokoSuiteClient
* REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteClient
* PATH: /src/packages/plg_system_mokosuiteclient/Service/ContentSyncService.php
* VERSION: 02.52.11
* VERSION: 02.52.17
* BRIEF: Sender-side content sync — builds payload and pushes to remote sites
*/
@@ -7,7 +7,7 @@
<license>GPL-3.0-or-later</license>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
<authorUrl>https://mokoconsulting.tech</authorUrl>
<version>02.52.11</version>
<version>02.52.17</version>
<description>Joomla Web Services API routes for MokoSuiteClient site management — health checks, cache, updates, backups, and site info.</description>
<namespace path="src">Moko\Plugin\WebServices\MokoSuiteClient</namespace>
<files>
+1 -1
View File
@@ -2,7 +2,7 @@
<extension type="package" method="upgrade">
<name>Package - MokoSuiteClient</name>
<packagename>mokosuiteclient</packagename>
<version>02.52.11</version>
<version>02.52.17</version>
<creationDate>2026-06-02</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>