While testing the template editor in j4.0.2 I can not see the svg images.The screen shot shows that J4 thinks I do not have the GD library available ,but it is? Is this a bug or does it work for you?
Also the documentation button goes to J3 info not J4.
Site Information
Setting Value
PHP Built On Linux manganese.cloudhosting.co.uk 4.18.0-305.10.2.2.lve.el7h.x86_64 #1 SMP Wed Jul 28 13:09:44 UTC 2021 x86_64
Database Type mysql
Database Version 10.3.30-MariaDB-log-cll-lve
Database Collation latin1_swedish_ci
Database Connection Collation utf8mb4_general_ci
Database Connection Encryption None
Database Server Supports Connection Encryption No
PHP Version 8.0.9
Web Server LiteSpeed
WebServer to PHP Interface litespeed
Joomla! Version Joomla! 4.0.2 Stable [ Furaha ] 24-August-2021 19:54 GMT
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0
Articles
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
@brianteeman On screan shot posted by @gwstyles there's visible COM_TEMPLATES_GD_EXTENSION_NOT_AVAILABLE message.
More of my shit code. a1ab74a
System Information reads from extension_loaded('gd')
this is correct.
Template manager is not checking for GD, its using COM_TEMPLATES_GD_EXTENSION_NOT_AVAILABLE as a placeholder when handling ANY RuntimeException
... could literally be any exception and it will just say that GD is not available.
Extract the following Zip file, and then Upload the file it contains to /administrator/components/com_templates/src/View/Template/HtmlView.php and try again and report back what the message is that is shown this time please.
Do you need larger images or is it ok?
I dont need larger images. Just follow the instructions I have provided and provide the messages that this dumps to the screen when you try.
I cant paste it here?
see attached.error message.txt
well that comes from getimagesize()
PHP function which Joomla throws a UnparsableImageException
Exception for which implements RuntimeException
Which image are you trying to edit? Can you upload that EXACT image here please.
Cant upload a svg, change jpg to .svg
You cannot edit SVG Files with Joomla's template manager The only formats supported are
static::$formats[IMAGETYPE_JPEG] = $info['JPEG Support'];
static::$formats[IMAGETYPE_PNG] = $info['PNG Support'];
static::$formats[IMAGETYPE_GIF] = $info['GIF Read Support'];
static::$formats[IMAGETYPE_WEBP] = $info['WebP Support'];
JPG extension tells me invalid mime type, so I have changed it to txt.
First time on git and a bit odd for an old git...
SVG is not "really" an image. It is an XML file - this is why GD gets confused. I'll write some code to catch this over the weekend.
OK that dont work,how do you upload an svg image to git?
You dont need to upload the SVG, I have already told you the problem and the solution.
Problem: SVG is not an image type. You are trying to edit a SVG. Joomla is not stopping you (it should) and passes the SVG to GD which complains when running getimagesize()
function
Solution: You cannot edit SVG in Joomla Template Manager. We also need to improve Joomla 4 to not allow you to attempt to, and to show you error messages like "You cannot edit SVG files in Joomla admin".
OK its not a bug then just not designed to do this.Good stuff lads.
You cannot edit SVG Files with Joomla's template manager The only formats supported are
@PhilETaylor in the template editor you should be able to edit the svg (using the codemirror editor, basically editing the text)
Yes but when Im talking about editing images with GD, they have to be one of those formats - not XML based SVG, which should be edited, not with GD Functions, but with text editor functions.
Yes but when Im talking about editing images with GD, they have to be one of those formats
Even Media manager can't handle all of the possible image formats (gif, ...) for some good reasons:
LMAO - a Media manager that can only handle 3 file types LMAO
I dont have time to look into all the Media Manager issues this weekend. Its meant to be a holiday, but here I am at 21:28 drinking espresso and opening my IDE.
I dont have time to look into all the Media Manager issues
Quick recap: the media manager repo when abandoned had around 100 open issues
I have a personal list of issues that are ranking from annoying bugs to serious sh**t
That doesn't mean that the media manager is bad, actually, it's the best implementation in the Joomla world (I've tested the others and they are 10 years behind). BUT needs hands to fix and implement whatever the MM team left half-baked...
Quick recap: the media manager repo when abandoned had around 100 open issues
Im no Javascript / Vue expert. I can only contribute minor fixes to javascript and fixes to the PHP side... and not 100 at a time :)
Labels |
Added:
J4 Media Manager
|
OK its not a bug then just not designed to do this.Good stuff lads.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35386.
This should be closed now
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-02-24 15:58:54 |
Closed_By | ⇒ | Quy |
Could you upload larger images please.