Some of our blog posts are randomly being affected and at the footer it’s saying “There has been a critical error on this website.” I enabled the Debug mode, and there seems to be an issue with the comments.php file that’s in the custom theme we use. When I rename it to ‘comments-old,php’, the blog goes back to normal. However, I don’t know if it should be kept that way. We don’t care about comments or even display them on the website. I have them disabled, but spammers still find a way to get in. See the error below. The site is running on PHP 8.3, WP 6.5.2
The theme was custom developed by another company. Please note, I’m not a developer, so please respond in a way I could understand lol. I appreciate the feedback – thanks in advance!
PS: The quick fix was duplicating the post and re-publishing it. However, that’s a lot of work. And now, WP won’t even let me change the year back to 2022.
Here’s the error:
Fatal error: Uncaught Error: Call to undefined function twentyseventeen\_get\_svg() in /home1/schnakel/public\_html/mls312/staging/wp-content/themes/High-Performance-Framework-master/comments.php:85 Stack trace: #0 /home1/schnakel/public\_html/mls312/staging/wp-includes/comment-template.php(1617): require() #1 /home1/schnakel/public\_html/mls312/staging/wp-content/themes/High-Performance-Framework-master/single.php(120): comments\_template(‘comments.php’) #2 /home1/schnakel/public\_html/mls312/staging/wp-includes/template-loader.php(106): include(‘/home1/schnakel…’) #3 /home1/schnakel/public\_html/mls312/staging/wp-blog-header.php(19): require\_once(‘/home1/schnakel…’) #4 /home1/schnakel/public\_html/mls312/staging/index.php(17): require(‘/home1/schnakel…’) #5 {main} thrown in /home1/schnakel/public\_html/mls312/staging/wp-content/themes/High-Performance-Framework-master/comments.php on line 85
I was advised to do the below, but don’t know how to. Again, I’m not a developer. However, I know how to go in and edit the code.
*Pretty simple. comments.php is trying to call a function twentyseventeen\_get\_svg() which doesn’t exist: Uncaught Error: Call to undefined function*
*You’ll probably need to contact the theme developer or, just find the part of the code in comments.php (line 88) that calls the function and comment it out.*
*Looks like that function comes with the theme twentyseventeen but yo’re not using twentyseventeen*
[this is as snippet from the code in comments.php](https://preview.redd.it/gyhspfxg31yc1.png?width=531&format=png&auto=webp&s=ea970da1f556951847f582b51ff1fd85d77958ed) [ad_2]
UPDATE: I was able to call it out in the code and that worked. I’m wondering if we really need this file since we don’t have comments active on the website. I’ll still keep the old file, just in case. What do you think?