?
Referenced as Pull Request for: # 28295
avatar brianteeman
brianteeman
4 Mar 2020

Steps to reproduce the issue

Change the site logo for the admin template to any type of jpg or png

Expected result

Image displayed without error

Actual result

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

Additional comments

I am guessing that this code is failing because it cant find an svg image

avatar brianteeman brianteeman - open - 4 Mar 2020
avatar joomla-cms-bot joomla-cms-bot - change - 4 Mar 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Mar 2020
avatar brianteeman
brianteeman - comment - 5 Mar 2020

Should be a super easy fix for anyone that understands the javascript to check if the image is an svg before continuing

avatar vijay9908
vijay9908 - comment - 5 Mar 2020

Can you explain how I can reproduce the bug in a clear way?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28226.
avatar brianteeman
brianteeman - comment - 5 Mar 2020

in the admin template style set a logo that is a jpg or png image

avatar N6REJ
N6REJ - comment - 7 Mar 2020

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.

avatar chmst
chmst - comment - 7 Mar 2020

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.

avatar brianteeman
brianteeman - comment - 7 Mar 2020

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

avatar SharkyKZ SharkyKZ - change - 10 Mar 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-03-10 09:26:19
Closed_By SharkyKZ
avatar joomla-cms-bot joomla-cms-bot - change - 10 Mar 2020
Closed_By SharkyKZ joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 10 Mar 2020
avatar joomla-cms-bot
joomla-cms-bot - comment - 10 Mar 2020

Set to "closed" on behalf of @SharkyKZ by The JTracker Application at issues.joomla.org/joomla-cms/28226

avatar SharkyKZ
SharkyKZ - comment - 10 Mar 2020

Please test PR #28295.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28226.

Add a Comment

Login with GitHub to post a comment