Change the site logo for the admin template to any type of jpg or png
Image displayed without error
Image displayed with js error below
uncaught TypeError: Cannot read property 'removeAttribute' of undefined
at onSuccess (template.js?1f22f7c44da70e959cfcdbc249e4a13b:96)
at XMLHttpRequest.xhr.onreadystatechange (core.js?1f22f7c44da70e959cfcdbc249e4a13b:823)
onSuccess @ template.js?1f22f7c44da70e959cfcdbc249e4a13b:96
xhr.onreadystatechange @ core.js?1f22f7c44da70e959cfcdbc249e4a13b:823
XMLHttpRequest.send (async)
Joomla.request @ core.js?1f22f7c44da70e959cfcdbc249e4a13b:837
(anonymous) @ template.js?1f22f7c44da70e959cfcdbc249e4a13b:78
changeSVGLogoColor @ template.js?1f22f7c44da70e959cfcdbc249e4a13b:74
(anonymous) @ template.js?1f22f7c44da70e959cfcdbc249e4a13b:276
I am guessing that this code is failing because it cant find an svg image
Labels |
Added:
?
|
Can you explain how I can reproduce the bug in a clear way?
in the admin template style set a logo that is a jpg or png image
https://github.com/joomla/joomla-cms/blob/4.0-dev/build/media_source/templates/atum/js/template.es6.js#L81 here the parsing fails if the img is not svg
https://github.com/joomla/joomla-cms/blob/4.0-dev/build/media_source/templates/atum/js/template.es6.js#L81 here the parsing fails if the img is not svg
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28226.
thats for applying color only isn't it? Strange that it would even be called.
I think that this replaces the big logo (j-logo + "joomla") by the small logo (J-logo only) and vice versa when the Sidebar is toggled.
the part of the js that is the problem is changing the color of the svg but it does it without checking to see that the logo is an svg and therefore produces the error when the logo is a png or jpg
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-03-10 09:26:19 |
Closed_By | ⇒ | SharkyKZ |
Closed_By | SharkyKZ | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @SharkyKZ by The JTracker Application at issues.joomla.org/joomla-cms/28226
Please test PR #28295.
Should be a super easy fix for anyone that understands the javascript to check if the image is an svg before continuing