Skip to content

Conversation

@SharkyKZ
Copy link
Contributor

@SharkyKZ SharkyKZ commented Mar 10, 2020

Pull Request for Issue #28226.

Summary of Changes

Adds file extension check to prevent issues when logo is not SVG.

Testing Instructions

node build.js --compile-js required.

Edit Atum template style.
Select a logo.
Inspect browser console.

Expected result

No errors.

Actual result

XML Parsing Error: not well-formed
Location: http://localhost/joomla-cms/administrator/index.php?option=com_templates&view=style&layout=edit&id=10
Line Number 1, Column 1: index.php:1:1
TypeError: svg is undefined template.js:95:11

Documentation Changes Required

No.

Additional Comments

I've picked what I think is the cleanest approach as it avoids unnecessary request when image is not SVG. It's somewhat limiting (the file doesn't need to have an extension) but works for our case. Alternatively, we could make the request but wrap it in try/catch or try to figure out the response some other way.

@joomla-cms-bot joomla-cms-bot added NPM Resource Changed This Pull Request can't be tested by Patchtester PR-4.0-dev labels Mar 10, 2020
@Quy
Copy link
Contributor

Quy commented Mar 10, 2020

I have tested this item ✅ successfully on 512e9d6


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

1 similar comment
@brianteeman
Copy link
Contributor

I have tested this item ✅ successfully on 512e9d6


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

@Quy
Copy link
Contributor

Quy commented Mar 10, 2020

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Mar 10, 2020
@richard67 richard67 merged commit 2da6b17 into joomla:4.0-dev Mar 10, 2020
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Mar 10, 2020
@richard67
Copy link
Member

Thanks.

@richard67 richard67 added this to the Joomla 4.0 milestone Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NPM Resource Changed This Pull Request can't be tested by Patchtester

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants