Title: Critical Error when submitting a comment
Last modified: June 22, 2021

---

# Critical Error when submitting a comment

 *  [clintmccaskill](https://wordpress.org/support/users/clintmccaskill/)
 * (@clintmccaskill)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/critical-error-when-submitting-a-comment/)
 * Hello, I am getting a critical error when submitting a comment on a blog or podcast
   post.
    I am able to access the rest of the admin site, only occurs on posting
   the comment. I enabled debugging, and got the following information, this occurs
   on the wp-comments-post.php page after hitting submit. I’ve tried restoring a
   back-up but that didn’t work. Any ideas where to start to fix this? I’m thinking
   maybe something to do with the php-mailer since the comment actually goes through.
 * Thank you!
 *     ```
       Notice: Use of undefined constant WPLANG - assumed 'WPLANG' in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/LayerSlider/classes/class.km.autoupdate.v3.php on line 73
   
       Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the anchor_menu.js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /opt/bitnami/apps/wordpress/htdocs/wp-includes/functions.php on line 5313
   
       Notice: Undefined offset: 0 in /opt/bitnami/apps/wordpress/htdocs/wp-includes/plugin.php on line 928
   
       Notice: Undefined offset: 0 in /opt/bitnami/apps/wordpress/htdocs/wp-includes/plugin.php on line 931
   
       Deprecated: class-phpmailer.php is deprecated since version 5.5.0! Use wp-includes/PHPMailer/PHPMailer.php instead. The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace. in /opt/bitnami/apps/wordpress/htdocs/wp-includes/functions.php on line 5051
   
       Deprecated: The called constructor method for WP_Widget in LayerSlider_Widget is deprecated since version 4.3.0! Use __construct() instead. in /opt/bitnami/apps/wordpress/htdocs/wp-includes/functions.php on line 4954
   
       Fatal error: Uncaught Error: Class 'PHPMailer\PHPMailer\SMTP' not found in /opt/bitnami/apps/wordpress/htdocs/wp-includes/PHPMailer/PHPMailer.php:1922 Stack trace: #0 /opt/bitnami/apps/wordpress/htdocs/wp-includes/PHPMailer/PHPMailer.php(2043): PHPMailer\PHPMailer\PHPMailer->getSMTPInstance() #1 /opt/bitnami/apps/wordpress/htdocs/wp-includes/PHPMailer/PHPMailer.php(1959): PHPMailer\PHPMailer\PHPMailer->smtpConnect(Array) #2 /opt/bitnami/apps/wordpress/htdocs/wp-includes/PHPMailer/PHPMailer.php(1637): PHPMailer\PHPMailer\PHPMailer->smtpSend('Date: Tue, 22 J...', 'A new comment o...') #3 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wp-mail-smtp/src/MailCatcher.php(88): PHPMailer\PHPMailer\PHPMailer->postSend() #4 /opt/bitnami/apps/wordpress/htdocs/wp-includes/pluggable.php(531): WPMailSMTP\MailCatcher->send() #5 /opt/bitnami/apps/wordpress/htdocs/wp-includes/pluggable.php(1925): wp_mail(Array, '[ZenMango] Plea...', 'A new comment o...', Array) #6 /opt/bitnami/apps/wordpress/htdocs/wp-includes/comment.php(2307): wp_ in /opt/bitnami/apps/wordpress/htdocs/wp-includes/PHPMailer/PHPMailer.php on line 1922
   
       There has been a critical error on this website.
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcritical-error-when-submitting-a-comment%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/critical-error-when-submitting-a-comment/#post-14585516)
 * This may be a plugin or theme conflict. Please attempt to disable all plugins,
   and switch to the default Twenty Twenty-One theme. If the problem goes away, 
   enable them one by one to identify the source of the problem.
 * If you can install plugins, install [Health Check](https://wordpress.org/plugins/health-check/).
   On the troubleshooting tab, you can click the button to disable all plugins and
   change the theme for you, while you’re still logged in, **without affecting normal
   visitors to your site**.
 *  Thread Starter [clintmccaskill](https://wordpress.org/support/users/clintmccaskill/)
 * (@clintmccaskill)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/critical-error-when-submitting-a-comment/#post-14585588)
 * Thanks, was trying that, however I am seeing larger problems now with random 
   images disappearing, not all, just some… site logo, slider images, some case 
   study images, some older blog images… very strange.
    I have updraft backup, but
   restoring didn’t help (and still kept the wordpress update), I also have BackUpWordPress
   backups, what’s the best way to revert to one of those, just ftp files over and
   overwrite?
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/critical-error-when-submitting-a-comment/#post-14585817)
 * Check the documentation for the backup plugin for their specific recommendations
   on restoring.
 *  Thread Starter [clintmccaskill](https://wordpress.org/support/users/clintmccaskill/)
 * (@clintmccaskill)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/critical-error-when-submitting-a-comment/#post-14593412)
 * I have tracked down this critical error to the updating of my WordPress version.
   
   I reverted to back-ups prior to the update, and everything was working correctly.
   Once I completed the WordPress update again, I got the same error.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/critical-error-when-submitting-a-comment/#post-14593417)
 * Please follow the steps in my first reply: [https://wordpress.org/support/topic/critical-error-when-submitting-a-comment/#post-14585516](https://wordpress.org/support/topic/critical-error-when-submitting-a-comment/#post-14585516)

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Critical Error when submitting a comment’ is closed to new replies.

## Tags

 * [critical error](https://wordpress.org/support/topic-tag/critical-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [James Huff](https://wordpress.org/support/users/macmanx/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/critical-error-when-submitting-a-comment/#post-14593417)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
