From 78affe89d6ff5784b72b7d8098cc47c5a3663f2a Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sat, 18 Apr 2026 15:18:36 -0500 Subject: [PATCH] Fix favicon: strip #joomlaImage:// fragment from media field path Joomla's media field appends #joomlaImage://local-images/... to the path. strtok($path, '#') strips everything after the hash. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.php b/src/index.php index 989cc5f..aeb8946 100644 --- a/src/index.php +++ b/src/index.php @@ -75,7 +75,8 @@ if ($params_favicon_source) { // 'images/logo.png' (images folder) // 'media/templates/site/mokocassiopeia/images/logo.png' (template media) // 'logo.png' (bare filename) - $faviconSourceRel = ltrim($params_favicon_source, '/'); + // Strip Joomla's #joomlaImage:// fragment from media field value + $faviconSourceRel = strtok(ltrim($params_favicon_source, '/'), '#'); $faviconSourceAbs = JPATH_ROOT . '/' . $faviconSourceRel; // Try common prefixes if not found if (!is_file($faviconSourceAbs)) {