SVG issue: Notify existing Stucco users OR hurry up to fix and release the core

Permalink
The author of Stucco, the #2 downloaded theme in the concrete5 marketplace, contacted me and asked me for help that his theme has SVG. 8.1.0 and 8.2.0a seems to have a SVG image bug and Stucco stops working with sample code installed.

http://www.concrete5.org/community/forums/themes/unable-to-install-...

He could switch the sample contents from SVG to JPEG, PNG for new users. But he and I don't think this is the right answer at all.

He gets a couple troubled support emails from existing users.
This SVG bug also applied to the existing users.

Even he updated his sample contents, the existing users still need to change the file manually.

They will realize after they upgrade their sites, then unable to view their site.

Anyway, he's wondering if there is any way that he could notify all users who downloaded Stucco to warn them not to upgrade their sites to 8.1.0.

I've checked the latest 8.2.0a, the SVG problem hasn't been fixed. But if we are able to fix the SVG problem, we should release the new version soon.

katz515
 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi katz515,

I installed Stucco on the latest develop branch of GitHub and confirm there are still issues with SVG files.

It appears that there was more than one bug with SVG files. I thought there was only one and that it was fixed.

The error when installing Stucco is:
…\src\Entity\File\Version.php1379
Call to a member function getSize() on boolean
MrKDilkington replied on at Permalink Reply
MrKDilkington
@katz515

I did some digging and found out what the problem is. The Stucco theme is using the Image block to display SVG images. I am very surprised this worked in 5.7 and didn't throw errors in the block view (they were being displayed as picture elements with duplicate srcset attribute values).
https://github.com/concrete5/concrete5/blob/develop/concrete/blocks/...
https://github.com/concrete5/concrete5/blob/develop/concrete/blocks/...

As far as I can tell, the Image block is currently not meant to be used for displaying SVG images. I believe I found a fix to prevent this this type of error from happening though.

In the meantime, the solution to this is for nipper to use a dedicated SVG block to add the images. I recommend the SVG Image block by Mesuva -https://github.com/Mesuva/svg_image.... He will need to update his sample content.

With all mainstream browsers supporting SVG, I think we need a built-in core method for using SVG images (users should not need to download or buy a block to use them). One idea is to update the Image block so it accepts SVG images. The Image block form elements would change depending on the type of image selected. I was thinking we could use the FileManagerSelectFile ConcreteEvent to do this - when the event fires, check the image type selected, then hide/show the matching form elements.
MrKDilkington replied on at Permalink Reply
MrKDilkington
@katz515

Here is a fix that should prevent the error from happening in the future.

Prevent errors when SVG images are used with the Image block #5343
https://github.com/concrete5/concrete5/pull/5343...
nipper15 replied on at Permalink Reply
nipper15
@MrKDilkington

Thank you for fixing quickly.