From 7ba0468907801251c2fed94766939d34871af438 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Thu, 11 Jun 2026 22:14:39 -0500 Subject: [PATCH] fix: submenu icons not rendering in Joomla 6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The CSS selector #menu doesn't exist in Joomla 6 — mod_menu uses id="menu{moduleId}" (dynamic). Switch to .main-nav class selector which is stable across Joomla 4/5/6. Also use margin-inline-end for RTL support. --- .../src/Extension/MokoSuiteBackupComponent.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/packages/com_mokosuitebackup/src/Extension/MokoSuiteBackupComponent.php b/source/packages/com_mokosuitebackup/src/Extension/MokoSuiteBackupComponent.php index 5512adf0..e6fad774 100644 --- a/source/packages/com_mokosuitebackup/src/Extension/MokoSuiteBackupComponent.php +++ b/source/packages/com_mokosuitebackup/src/Extension/MokoSuiteBackupComponent.php @@ -30,13 +30,13 @@ class MokoSuiteBackupComponent extends MVCComponent $wa = $app->getDocument()->getWebAssetManager(); $wa->addInlineStyle( - '#menu a[href*="com_mokosuitebackup"][href*="view=dashboard"] .sidebar-item-title::before,' - . ' #menu a[href*="com_mokosuitebackup"][href*="view=backups"] .sidebar-item-title::before,' - . ' #menu a[href*="com_mokosuitebackup"][href*="view=profiles"] .sidebar-item-title::before' - . ' { font-family: "Font Awesome 6 Free"; font-weight: 900; margin-right: .5em; }' - . ' #menu a[href*="com_mokosuitebackup"][href*="view=dashboard"] .sidebar-item-title::before { content: "\f015"; }' - . ' #menu a[href*="com_mokosuitebackup"][href*="view=backups"] .sidebar-item-title::before { content: "\f1c0"; }' - . ' #menu a[href*="com_mokosuitebackup"][href*="view=profiles"] .sidebar-item-title::before { content: "\f013"; }' + '.main-nav a[href*="com_mokosuitebackup"][href*="view=dashboard"] .sidebar-item-title::before,' + . ' .main-nav a[href*="com_mokosuitebackup"][href*="view=backups"] .sidebar-item-title::before,' + . ' .main-nav a[href*="com_mokosuitebackup"][href*="view=profiles"] .sidebar-item-title::before' + . ' { font-family: "Font Awesome 6 Free"; font-weight: 900; margin-inline-end: .5em; }' + . ' .main-nav a[href*="com_mokosuitebackup"][href*="view=dashboard"] .sidebar-item-title::before { content: "\f015"; }' + . ' .main-nav a[href*="com_mokosuitebackup"][href*="view=backups"] .sidebar-item-title::before { content: "\f1c0"; }' + . ' .main-nav a[href*="com_mokosuitebackup"][href*="view=profiles"] .sidebar-item-title::before { content: "\f013"; }' ); } catch (\Throwable $e) { error_log('MokoSuiteBackup: boot() CSS injection failed: ' . $e->getMessage());