Bug: site alias offline parameter does not trigger offline mode #72
Closed
opened 2026-05-28 18:09:02 +00:00 by jmiller
·
1 comment
No Branch/Tag Specified
main
version/02.20.00
dev
version/02.18.00
version/02.17.00
94bddceda4012d2bd89cfd3283eaa770393cdd15
658fdcca75c306bffec702bc15ff644477a81310
d48415ab5af075c6ddff49700a1515428564554e
version/02.17.00-dev
version/02.16.00-dev
479daf4a4394f9efd72236b2476ef303d0e28e2a
version/02.15.00
version/02.14.00
feature/72-bug-site-alias-offline-parameter-does-no
0d2486230256e3e41baae51d6744c140f7974c62
70748938d24d46c35673639cf71332b9711e8bb8
ed95dcb7af919b19e15d3218df4107d04333a708
version/02.13.00
3aa7364783f13cef005f4337da6b22b86fca0f3b
version/02.12.00
9c9a1a7b52ee265d9a0e4c8dd0b93c0dd94e47bf
2c0ed08368be0e0ebb311ee3f854eb38efb4b0e8
a2eaf549af2182ba5976780b491dd6d6b4c79483
feature/48-plg-webservices-mokowaas-update-event-ha
c6c9b217a1d8c815b86b1ecc4bfae87d284d06c8
43abc6514e235195c4bbf0a6ca13c16fff8ddf0d
e66b7e9a79cd7c033a4f50dc7e845136fc327cbd
fad0170cefcb404a9cd7b4e08f3cd4d1623ca0ab
65d9aa3e9fe2d94f5b29811d7c3e14587afb7adb
version/02
8c9e3e6d44d568da3475bf6d775ef28ef79be9b9
bdceb4256f0f73b12e928e67f0d271c70bb1967f
stable
alpha
beta
Labels
Clear labels
automation
breaking-change
build
ci-cd
config
css
dependencies
deploy-failure
docker
documentation
dolibarr
generic
good first issue
health-check
health: excellent
health: fair
health: good
health: poor
help wanted
html
javascript
joomla
major-release
minor-release
mokostandards
needs-review
needs-testing
patch-release
php
priority: critical
priority: high
priority: low
priority: medium
push-failure
python
regression
release-candidate
security
size/l
size/m
size/s
size/xl
size/xs
size/xxl
standards-drift
standards-update
standards-violation
status: blocked
status: in-progress
status: needs-review
status: on-hold
status: pending
status: wontfix
sync-failure
sync-report
template-validation-failure
test-failure
tests
type: bug
type: chore
type: enhancement
type: feature
type: refactor
type: release
type: test
type: version
typescript
version
version-branch
version-drift
work-in-progress
bug
chore
documentation
enhancement
feature
pending: dependency
pending: deployment
pending: design
pending: documentation
pending: feedback
pending: review
pending: testing
priority: critical
priority: high
priority: low
priority: medium
refactor
roadmap
scope: client
scope: dolibarr
scope: infrastructure
scope: joomla
scope: waas
security
status: blocked
status: duplicate
status: in-progress
status: needs-review
status: wontfix
Automated processes or scripts
Breaking API or functionality change
Build system changes
CI/CD pipeline changes
Configuration file changes
CSS/styling changes
Dependency updates
Automated deploy failure tracking
Docker configuration changes
Documentation changes
Dolibarr module or extension
Generic project or library
Good for newcomers
Repository health check results
Health score 90-100
Health score 50-69
Health score 70-89
Health score below 50
Extra attention needed
HTML template changes
JavaScript code changes
Joomla extension or component
Major version release (breaking changes)
Minor version release (XX.YY.00)
MokoStandards compliance
Awaiting code review
Requires manual or automated testing
Patch version release (XX.YY.ZZ)
PHP code changes
Critical priority, must be addressed immediately
High priority
Low priority
Medium priority
File push failure requiring attention
Python code changes
Regression from a previous working state
Release candidate build
Security-related changes
Large change (101-300 lines)
Medium change (31-100 lines)
Small change (11-30 lines)
Extra large change (301-1000 lines)
Extra small change (1-10 lines)
Extremely large change (1000+ lines)
Repository drifted from MokoStandards
MokoStandards sync update
Standards compliance failure
Blocked by another issue or dependency
Currently being worked on
Awaiting code review
Temporarily on hold
Pending action or decision
This will not be worked on
Bulk sync failure requiring attention
Bulk sync run report
Template workflow validation failure
Automated test failure
Test suite changes
Something isn't working
Maintenance tasks
Enhancement to existing feature
New feature or request
Code refactoring
Release preparation or tracking
Test suite additions or changes
Version-related change
TypeScript code changes
Version bump or release
Version branch related
Version mismatch detected
Work in progress, not ready for merge
Something is not working
Maintenance and housekeeping
Documentation improvements
Improvement to existing functionality
New feature or request
Blocked by another issue or external dependency
Tested and approved, awaiting deployment to production
Needs UI/UX or architecture design before implementation
Feature works, needs documentation/wiki update
Awaiting feedback or decision from stakeholder
Implementation complete, awaiting code review
Feature implemented but not yet tested
Must fix immediately
Should fix soon
Nice to have
Fix when convenient
Code restructuring without behavior change
Planned feature or enhancement tracked on the roadmap
Client-specific work
Dolibarr modules and customizations
Server, CI, backups, monitoring
Joomla templates and extensions
MokoWaaS platform
Security vulnerability or hardening
Waiting on external dependency
Duplicate of another issue
Being worked on
Ready for review
Will not be addressed
No labels
Milestone
No items
No Milestone
Assignees
jmiller (Jonathan Miller)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: MokoConsulting/MokoWaaS#72
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
When a site alias is configured via the MokoWaaS plugin subform with
offlineset to1, visiting the alias domain does not trigger Joomla's offline mode. The site continues to render normally.Root Cause
handleSiteAlias()is called inonAfterRoute()(line ~900), which sets$this->app->getConfig()->set('offline', 1). However, Joomla checks theofflineconfig value beforeonAfterRoutefires — during the application'sdoExecute()method. By the time the plugin setsoffline=1, Joomla has already decided to render the site normally.Relevant code path
onAfterRoute()→handleSiteAlias()→$this->app->getConfig()->set('offline', 1)(line ~2968)SiteApplication::doExecute()checks$this->get('offline')before dispatching, so the plugin's change comes too late.Expected Behavior
When an alias domain has
offline: 1set in the subform, visiting that domain should show Joomla's offline page (rendered through the template'soffline.php).Suggested Fix
Move the alias offline check to
onAfterInitialise()instead ofonAfterRoute(). TheonAfterInitialiseevent fires early enough that settingoffline=1in the config will be respected by Joomla's application execution flow.Alternatively, instead of relying on Joomla's native offline mode, render the offline page directly and call
$this->app->close()— similar to how the emergency access handler works.Environment
Branch created:
feature/72-bug-site-alias-offline-parameter-does-no