Twentig seems to break SVG logos on PHP 8.1
-
Using WP 6.1.1 + Twenty Twenty One 1.7 + Twentig 1.5.2 on a WordOps configuration with NGINX + FastCGI, I decided to upgrade from PHP 7.4 to PHP 8.1 as it’s approaching end of life.
After the update, I faced a “There has been a critical error on this website”, and a 500 error after the GET request in console. I was still able to log in to the dashboard in a different browser, but as soon as I tried to preview a post the same error popped up. Weird.
Anyways, after digging through the error logs I found this:
FastCGI sent in stderr: “PHP message: PHP Warning: Division by zero in /var/www/SITENAMEREDACTED.com/htdocs/wp-content/plugins/twentig/inc/classic/twentytwentyone/front-style.php on line 743PHP message: PHP Warning: Division by zero in /var/www/SITENAMEREDACTED.com/htdocs/wp-content/plugins/twentig/inc/classic/twentytwentyone/front-style.php on line 747”
And after digging deeper I found that this could be related to the site logo being in SVG format. So I tried switching the logo to JPG and voila! The error was gone.
That said, I’d like to be able to use the SVG format in my site logo — any suggestions on how to fix this?
- The topic ‘Twentig seems to break SVG logos on PHP 8.1’ is closed to new replies.