We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum
SVG error on save
I have a similar issue that was already posted on the forum some days ago – though as I see no solution has been made – so I share it again.
When I upload an SVG file, it seems to be working on the site itself, but throws the warning below in the admin:
Warning: Division by zero in E:\1706_3h-epitesziroda-website\31_Web\perch\core\lib\PerchImage.class.php on line 107 Warning: Division by zero in E:\1706_3h-epitesziroda-website\31_Web\perch\core\lib\PerchImage.class.php on line 114
The SVGs I'm trying to upload doesn't have height and width properties embedded, but are stylized by CSS. As they're the 'raw' files from the 'Icon54' icon set, I don't want to manually add height and witdth properties to about 5.000 of them (as well as I want the client to be able to upload their own). Is there a good Perch workaround for this – so that I can use these SVGs as they are?
Here is an SVG file sample, with that I have this error (other icons from the referenced icon set have a similar structure):
<?xml version="1.0" encoding="utf-8"?> <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve"> <g> <g> <path d="M15,29.5C7,29.5,0.5,23,0.5,15S7,0.5,15,0.5S29.5,7,29.5,15S23,29.5,15,29.5z M15,1.5C7.6,1.5,1.5,7.6,1.5,15 S7.6,28.5,15,28.5S28.5,22.4,28.5,15S22.4,1.5,15,1.5z"/> </g> <g> <path d="M22,15.5h-7c-0.3,0-0.5-0.2-0.5-0.5V5c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v9.5H22c0.3,0,0.5,0.2,0.5,0.5 S22.3,15.5,22,15.5z"/> </g> </g> </svg>
I'm on Windows – I don't know if it matters.
Here is my diagnostic information, just in case:
Perch: 3.0.10, PHP: 5.6.30, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $, with PDO Server OS: WINNT, apache2handler Installed apps: content (3.0.10), assets (3.0.10), categories (3.0.10) App runtimes: <?php $apps_list = [ ]; PERCH_LOGINPATH: /perch PERCH_PATH: E:\1706_3h-epitesziroda-website\31_Web\perch PERCH_CORE: E:\1706_3h-epitesziroda-website\31_Web\perch\core PERCH_RESFILEPATH: E:\1706_3h-epitesziroda-website\31_Web\perch\resources Image manipulation: GD PHP limits: Max upload 4M, Max POST 16M, Memory: 256M, Total max file upload: 4M F1: 3b606135b33e6a102526838f4152a807 Resource folder writeable: Yes HTTP_HOST: 3h.l1 DOCUMENT_ROOT: E:/1706_3h-epitesziroda-website/31_Web REQUEST_URI: /perch/core/settings/diagnostics/ SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Thank you in advance, Márton Lente
Want to reply to this thread?Login with Perch