SVG issue: Notify existing Stucco users OR hurry up to fix and release the core
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.
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:
Call to a member function getSize() on boolean
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).
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.
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
Thank you for fixing quickly.