Undefined variable in comment form

Hello to all,

My site has an error with the “How to form” block:

**Warning** : Undefined variable $_view_data in **/homepages/22/d809032689/htdocs/monconsultantmarketing/wp-content/themes/pro/cornerstone/includes/elements/definitions/comment-form.php** on line **81**

I looked in the concerned file, here are the lines of code (that I never touched before):
Capture d’écran 2022-03-04 à 14.36.58

Would you have an idea to solve this problem?

Thanks in advance :slight_smile:

Hi Richard,

Thanks for reaching out.
I have checked the URL but didn’t find the issue you described here. As this is just the warning you can just ignore it by adding the following code into your wp-config.php file.

define( 'WP_DEBUG', false );

Please find the video that will help you to edit wp-config.php and add the above code: https://www.youtube.com/watch?v=3SDPTafEM8o

Hope it helps.
Thanks

Hello,

I have tried your solution but it doesn’t change anything, the alert message continues to be displayed.

Would you have another solution?

Hello Richard,

Did you have any custom PHP code in your child theme’s functions.php file? how about 3rd party plugin that is related to the comments? To better assist your with the issue, please provide us your WP credentials so that we can investigate further. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
- Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.