From f5bcc7c4570afa5f348ca86c21eb577ca3148893 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sun, 12 Jul 2026 19:05:15 -0500 Subject: [PATCH 1/9] @ fix(css): reliably load component stylesheets (progress bar was unstyled) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The full-screen backup progress bar lost all styling after the CSS moved to the Web Asset Manager: this component's WAM style assets do not emit a on the admin document. The asset resolves without error (Joomla lazily registers media/com_mokosuitebackup/joomla.asset.json, so useStyle does not throw) yet no stylesheet tag is rendered — and the same was already silently true of com_mokosuitebackup.admin (it was just cosmetic, so unnoticed). Confirmed live: neither runbackup.css nor admin.css loads, body stays white, the bar has no track/fill. Attach the external media stylesheets directly to the document (addStyleSheet), which renders reliably via . The joomla.asset.json + useStyle calls are kept so the WAM path resumes automatically if/when it starts emitting. Fixes both runbackup and the profile edit screen. Claude-Session: https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i @ --- .../packages/com_mokosuitebackup/tmpl/profile/edit.php | 7 ++++++- .../com_mokosuitebackup/tmpl/runbackup/default.php | 10 ++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/source/packages/com_mokosuitebackup/tmpl/profile/edit.php b/source/packages/com_mokosuitebackup/tmpl/profile/edit.php index 35e6ca66..c144d689 100644 --- a/source/packages/com_mokosuitebackup/tmpl/profile/edit.php +++ b/source/packages/com_mokosuitebackup/tmpl/profile/edit.php @@ -14,13 +14,18 @@ use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; HTMLHelper::_('behavior.formvalidator'); HTMLHelper::_('behavior.keepalive'); HTMLHelper::_('bootstrap.modal'); -/* Component CSS via the Web Asset Manager (declared in media/joomla.asset.json) */ +/* Component CSS. Registered in media/joomla.asset.json, but this component's WAM + styles don't emit on the admin document (asset resolves without error yet no + renders), so attach the external stylesheet directly — reliably output + via . */ $this->getDocument()->getWebAssetManager()->useStyle('com_mokosuitebackup.admin'); +$this->getDocument()->addStyleSheet(Uri::root(true) . '/media/com_mokosuitebackup/css/admin.css'); $profileId = (int) $this->item->id; $token = Session::getFormToken(); diff --git a/source/packages/com_mokosuitebackup/tmpl/runbackup/default.php b/source/packages/com_mokosuitebackup/tmpl/runbackup/default.php index 0238f35f..929d2cc9 100644 --- a/source/packages/com_mokosuitebackup/tmpl/runbackup/default.php +++ b/source/packages/com_mokosuitebackup/tmpl/runbackup/default.php @@ -89,9 +89,15 @@ $config = [ ], ]; -// All screen CSS loads via the Joomla Web Asset Manager (media/joomla.asset.json), -// not an inline