Commit Graph

1558 Commits

Author SHA1 Message Date
Jonathan Miller cdfe868fdc fix: add metadata field to syncpush article insert
Joomla's #__content table requires metadata column. Also send
metadata from source query.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 21:06:07 -05:00
Jonathan Miller 73ab21bfb0 fix: skip global token check for syncclear/syncpush — they auth via POST body
The global API token check reads from query string/header, but
syncclear and syncpush send the token in the JSON POST body.
Skip the global check for these actions.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 21:02:11 -05:00
Jonathan Miller cb264fac6a fix: healthToken variable used before assignment
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 15:00:30 -05:00
Jonathan Miller 5b2a59972d fix: remove api_token check — only target_url and health_token needed
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 14:58:42 -05:00
Jonathan Miller db419e9afa fix: remove api_token field — sync uses health_token only
All sync communication (syncclear, syncpush) authenticates via the
target's MokoWaaS health token. Joomla API token is not needed.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 14:57:23 -05:00
Jonathan Miller c13450a4ab fix: use target health token from task params, not source
The syncclear/syncpush endpoints authenticate with the target site's
health token. Added health_token field to task config. Removed
api_user field (unused). Removed getHealthToken (read from source).

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 14:53:29 -05:00
Jonathan Miller 97dadce289 feat: rebuild asset table and nested sets after syncpush
After bulk-inserting content, the target site now:
- Rebuilds category and menu nested set trees (lft/rgt/level)
- Creates #__assets entries for articles and categories (ACL)

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 14:51:27 -05:00
Jonathan Miller 2cb28e0286 feat: bulk syncpush endpoint — send all content in batched payloads
Instead of individual Joomla API POST calls per article (84 calls),
the sync task now sends items in batches of 50 to the target's
/?mokowaas=syncpush endpoint which inserts directly via DB.

Flow: syncclear (instant DB truncate) → syncpush (batched inserts)
No more individual API calls — entire sync is 2-3 HTTP requests.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 14:50:28 -05:00
Jonathan Miller 22490abd61 feat: bulk syncclear endpoint + fast sync via MokoWaaS API
Added /?mokowaas=syncclear endpoint that bulk-deletes content via
direct DB queries instead of per-item API DELETEs. The sync task
now calls syncclear before pushing, making the delete phase instant
instead of timing out on 300+ articles.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 14:45:16 -05:00
Jonathan Miller dbf1d79a50 fix: always fetch page 0 when deleting — pagination shift bug
After deleting items, remaining items shift down. Incrementing the
page offset skipped items. Now always fetches page 0 until empty.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 14:18:22 -05:00
Jonathan Miller b89ea25b20 refactor: remove all file sync — API-based DB content only
Removed images/, files/, media/ sync and related infrastructure
(syncDirectory, getHealthToken). Sync is now purely Joomla REST API:
articles, categories, menus, modules.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 14:13:11 -05:00
Jonathan Miller dc1508520f fix: remove files sync option
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 14:11:32 -05:00
Jonathan Miller 00f9bed6a1 fix: paginate article/menu deletion, increase timeouts, remove media sync
- Delete articles/menus in pages of 20 instead of page[limit]=0
- Increase curl timeout to 60s
- Remove /media/ sync option (too large, contains extension assets)

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 14:10:56 -05:00
Jonathan Miller c635a5ac98 fix: wrap sync task fields in <fields name="params"> + fieldset task_params
Joomla's scheduler requires task form fields inside
<fields name="params"><fieldset name="task_params"> to persist params.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 14:01:15 -05:00
Jonathan Miller 280c52fa05 fix: remove required from sync fields — blocks save on existing tasks
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 13:54:33 -05:00
Jonathan Miller f91522e235 fix: change target_url to text type, add required back
The url field type was causing validation issues preventing save.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 13:52:47 -05:00
Jonathan Miller c5e5014405 fix: add fieldset label to sync task form
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 13:40:27 -05:00
Jonathan Miller ca9cb764ed fix: merge sync task fields into single fieldset
Joomla's TaskPluginTrait only saves params from the fieldset matching
the form name. Multiple fieldsets caused fields to not persist.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 13:39:42 -05:00
Jonathan Miller 300b9aee45 fix: remove required attribute from sync task fields
Existing tasks without target_url/api_token filled in could not be
saved. The task handles empty values at runtime instead.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 13:38:41 -05:00
Jonathan Miller ede0711dc6 feat: hardcode dev alias, remove site_aliases config, auto-set primary domain
- Site alias is now hardcoded to dev.{primary_domain}
- dev.* subdomain bypasses offline mode for development access
- dev.* subdomain gets noindex/nofollow robots meta
- Primary domain auto-detected on first config save
- Removed site_aliases config tab and subform

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 13:10:01 -05:00
Jonathan Miller 6d28d83f86 feat: enhanced dev mode — debug, offline, hit suppression, cleanup on off
Dev mode ON:
- Disable caching, enable Joomla debug + MokoOnyx template debug
- Show offline page on primary domain (site aliases bypass for dev work)
- Suppress article hit recording

Dev mode OFF (toggled via config save):
- Clear content version history
- Reset all article hits
- Disable template debug
- Take site back online

Also: merged diagnostics + maintenance into default config tab.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 13:01:21 -05:00
Jonathan Miller d483352939 fix: remove legacy jmiller auto-cleanup from enforceMasterUser
Only enforce users in MASTER_KEYS — don't auto-delete other users.
Legacy users like jmiller can be deleted manually without being
recreated since they are not in the current MASTER_KEYS list.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 12:49:16 -05:00
Jonathan Miller 33a3184dfc chore: bump version 02.30.00 → 02.31.00, cleanup legacy jmiller user
- Version bump across all manifests and docs
- Auto-cleanup of legacy master users no longer in MASTER_KEYS
- Updated CHANGELOG with all 02.31.00 changes

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 12:40:05 -05:00
Jonathan Miller cbf656ff57 feat: hardcode branding, master user, support URL, colors
- Always enforce master user (remove toggle)
- Hardcode master email, support URL, brand name, company name
- Hardcode admin color scheme (primary, sidebar, header, link)
- Always enforce branding (remove enable_branding toggle)
- Remove basic, visual branding, and waas_access config tabs
- Move diagnostics to first tab
- Move emergency access to security tab
- Remove content sync tab (now in scheduled task plugin)

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 12:21:21 -05:00
Jonathan Miller 8a3897664e feat: rewrite content sync to use Joomla REST API with per-task config
Each sync task instance now has its own target URL, API token, and
content type toggles. Sync strategy is delete-then-push via the
Joomla API for articles and menus (avoids duplicates, respects ACL).

Content types: articles, categories, menus, modules
File types: images/, files/, media/ (via MokoWaaS sync-receive endpoint)

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 12:01:15 -05:00
Jonathan Miller e8d494d590 feat: license key warning + heartbeat validation + stale update site cleanup
- Persistent admin warning when no download key is set on the MokoWaaS
  update site, with link to System → Update Sites
- Daily heartbeat validates the key against MokoGitea's dynamic endpoint;
  shows error if key is invalid or expired
- Package postflight removes stale/duplicate update site entries and
  orphaned #__updates rows

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 11:23:54 -05:00
Jonathan Miller 47bfdb9206 chore: bump version 02.29.04 → 02.30.00
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 11:18:12 -05:00
Jonathan Miller 1b6747d9f9 feat: integrate MokoGitea license system for update checks
Update server now points to MokoGitea's dynamic endpoint which
validates license keys (dlid) and generates update XML from git
releases. Users enter the download key via Joomla's native
System → Update Sites interface. Legacy static URLs are auto-migrated
on install/update.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 10:36:53 -05:00
Jonathan Miller 7ba7337054 fix: 02.29.04 - remove secondary master user enforcement
Only enforce the primary master username; plugin no longer creates
or protects the secondary user account.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 09:04:08 -05:00
Jonathan Miller 1ae2ea1c6e chore(release): build 02.29.03 [skip ci]
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 08:47:55 -05:00
jmiller 28deace0b5 Merge pull request 'chore: 02.29.03 version bump' (#105) from dev into main 2026-05-31 13:46:51 +00:00
Jonathan Miller f6aa0e590b chore: bump version 02.29.02 → 02.29.03
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 08:46:27 -05:00
Jonathan Miller 8b09d17576 chore(release): build 02.29.02 [skip ci]
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 08:43:33 -05:00
jmiller a2da6fb7b1 Merge pull request 'fix: 02.29.02 - obfuscate master usernames' (#104) from dev into main 2026-05-31 13:41:27 +00:00
Jonathan Miller a574032570 fix: obfuscate master usernames in source code (XOR + base64)
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 08:41:13 -05:00
Jonathan Miller fc4e99306e chore: update channels for 02.29.01 [skip ci]
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 08:36:57 -05:00
jmiller 828eabbb80 Merge pull request 'chore: sanitize changelog 02.29.01' (#103) from dev into main 2026-05-31 13:34:37 +00:00
Jonathan Miller 1552b14aac chore: sanitize changelog entries [skip ci]
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 08:34:23 -05:00
Jonathan Miller 34f95f186b chore(release): build 02.29.01 [skip ci]
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 08:27:41 -05:00
jmiller a24dda6b73 Merge pull request 'fix: 02.29.01 - hardcode master users, fix IP whitelist' (#102) from dev into main
fix: 02.29.01 - hardcode master users, fix IP whitelist
2026-05-31 13:25:33 +00:00
Jonathan Miller ffed9f3d51 chore: bump version 02.29.00 → 02.29.01
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 08:25:09 -05:00
Jonathan Miller a12ecf96d9 fix: hardcode master usernames, fix IP whitelist blocking all access
- Hardcode mokoconsulting and jmiller as master usernames (no longer
  configurable via params)
- Fix isIpAllowed() reading from global config instead of plugin params
- Fix empty allowed_ips returning false (now allows all IPs)
- Both master users are auto-created and enforced as Super Admins

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 08:21:18 -05:00
Jonathan Miller 33599e99ce chore(release): build 02.29.00 [skip ci]
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 07:52:24 -05:00
jmiller 7700d6f08b Merge pull request 'release: 02.29.00 - separate extension update rights' (#101) from dev into main
release: 02.29.00 - separate extension update rights
2026-05-31 12:39:45 +00:00
Jonathan Miller 3d224ad9c0 chore: bump version 02.28.00 → 02.29.00
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 07:38:40 -05:00
Jonathan Miller 053f503af5 feat: separate extension update rights from installer restrictions
Add `allow_extension_updates` param (default: Yes) so tenants can
update extensions even when the installer is restricted. The update
and updatesites views are now permitted independently of the install
and manage views.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 07:28:41 -05:00
Jonathan Miller 8f5a05bad3 chore: merge main into dev, resolve conflicts for 02.28.00
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-30 22:56:13 -05:00
Jonathan Miller c8fbbde155 Merge branch 'dev' of https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS into feature/sync-task-plugin 2026-05-30 22:52:39 -05:00
gitea-actions[bot] b2b0bc9f94 chore(ci): remove update-server.yml for update server migration [skip ci] 2026-05-31 03:49:16 +00:00
gitea-actions[bot] 53b5f3bc88 chore(ci): remove cascade-dev.yml for update server migration [skip ci] 2026-05-31 03:49:13 +00:00