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) <noreply@anthropic.com>
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user