fix: CLI backups no longer named joomla.invalid (host placeholder) #235
Reference in New Issue
Block a user
Delete Branch "fix/cli-host-placeholder"
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?
Cosmetic fix found during suite.dev verification: CLI/console-triggered backups were named
joomla.invalid_<ts>_profile1.zip.Cause
PlaceholderResolverresolves[HOST]from$_SERVER['HTTP_HOST'], but Joomla's console fills that with the reserved sentinel hostjoomla.invalid(RFC 6761.invalidTLD). The resolver's "is this host usable?" guard only rejected''andlocalhost, so the sentinel passed straight through.Fix
Treat
joomla.invalidas unusable too, and fall through the existing chain: request host →live_siteconfig → system hostname. Web/AJAX/scheduled-web backups are unaffected (they have a realHTTP_HOST).Note: to get the exact domain in CLI-built names, the site's live_site should be set; otherwise the fallback is the system hostname (still a real, stable identifier instead of the meaningless sentinel).
Verify
php -lclean.joomla.invalid).https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i