fix(plugin): correct event handler, language keys, and repo refs #11

Merged
jmiller-moko merged 2 commits from dev/03.08.04 into main 2026-03-24 21:12:09 +00:00
jmiller-moko commented 2026-03-24 20:34:25 +00:00 (Migrated from github.com)

Summary

  • Fixed legacy mokojoomtos.php: Changed from onAfterInitialise to onAfterRoute and added tmpl=component for component-only view during offline mode — aligning it with the modern Extension/MokoJoomTOS.php class
  • Fixed script.php: Corrected language keys (_OFFLINE_ variants didn't exist in INI files) and fixed $extension property from plg_system_mokojoomtos_offline to plg_system_mokojoomtos
  • Fixed all documentation: Updated markdown FILE INFORMATION headers, links, and titles from the template repo (MokoStandards-Template-Joomla-Component) to MokoJoomTOS; corrected README event reference

Files Changed

File Change
src/mokojoomtos.php onAfterRoute + tmpl=component
src/script.php Language keys, subpackage, extension property
README.md Event reference, internal diagram
CHANGELOG.md Header, links, planned items, new entry
CONTRIBUTING.md Header, title, clone URL, help links
CODE_OF_CONDUCT.md Header DEFGROUP/INGROUP/REPO
SECURITY.md Header DEFGROUP/INGROUP/REPO, subject line
.github/copilot-instructions.md Legacy file note

Test plan

  • Install plugin in Joomla 4.x test environment
  • Install plugin in Joomla 5.x test environment
  • Set site offline and verify /terms-of-service is accessible
  • Verify TOS page renders without template chrome (component-only view)
  • Verify installation script creates article, menu type, and menu item
  • Verify installation messages display correctly (language keys resolved)
  • Verify all documentation links point to correct repository

🤖 Generated with Claude Code

## Summary - **Fixed legacy `mokojoomtos.php`**: Changed from `onAfterInitialise` to `onAfterRoute` and added `tmpl=component` for component-only view during offline mode — aligning it with the modern `Extension/MokoJoomTOS.php` class - **Fixed `script.php`**: Corrected language keys (`_OFFLINE_` variants didn't exist in INI files) and fixed `$extension` property from `plg_system_mokojoomtos_offline` to `plg_system_mokojoomtos` - **Fixed all documentation**: Updated markdown FILE INFORMATION headers, links, and titles from the template repo (`MokoStandards-Template-Joomla-Component`) to `MokoJoomTOS`; corrected README event reference ## Files Changed | File | Change | |------|--------| | `src/mokojoomtos.php` | `onAfterRoute` + `tmpl=component` | | `src/script.php` | Language keys, subpackage, extension property | | `README.md` | Event reference, internal diagram | | `CHANGELOG.md` | Header, links, planned items, new entry | | `CONTRIBUTING.md` | Header, title, clone URL, help links | | `CODE_OF_CONDUCT.md` | Header DEFGROUP/INGROUP/REPO | | `SECURITY.md` | Header DEFGROUP/INGROUP/REPO, subject line | | `.github/copilot-instructions.md` | Legacy file note | ## Test plan - [ ] Install plugin in Joomla 4.x test environment - [ ] Install plugin in Joomla 5.x test environment - [ ] Set site offline and verify `/terms-of-service` is accessible - [ ] Verify TOS page renders without template chrome (component-only view) - [ ] Verify installation script creates article, menu type, and menu item - [ ] Verify installation messages display correctly (language keys resolved) - [ ] Verify all documentation links point to correct repository 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoJoomTOS#11