Does Roots_Walker_Comment replace comment_form() completly?

I’m developing my first WP theme for ThemeForest and I’ve hit a snag that I’m not sure how to resolve. I’ve run my theme through Theme Check and I get this one error:

I know Roots has it’s own method of handling comments (which seems to work fine to me) but does it completely circumvent the use of comment_form()?

My interest is in just passing this test so I’m able to submit the theme, would it make sense to remove the Roots_Walker_Comment class and just use Wordpress’s default comment_form() to display comments, or am I just asking for trouble by doing that?

Afaik the comment walker has little to do with outputting the comment form. The comment form’s markup is in templates/comments.php.

The easiest way to figure out whether your proposed solution will work is to simply try it, but I suspect the result will not be what you expect.

Try replacing line 13 in your single template with a call to comment_form().

Thanks for your response cfx,

I tried your solution and I get the same result I get when I tried to just comment out the Roots_Walker_Comment class. The form displays, and submits comments, but does not show them on the page.

When I tried your suggestion, the form showed up, I added a test comment however it did not display on the page after submitting. When I uncommented

comments_template('/templates/comments.php');

to return to the Roots commenting method, I could see the previously submitted comment. I’m not quite sure how to resolve that. Honestly I’m of a mind to simply submit the theme to Theme Forest anyway as the Roots commenting system works perfectly fine. We’ll see how that goes, if they tell me I have to absolutely have that specific function, then I guess I’ll spend more time coming up with a work around.

Thanks again for your suggestion cfx I appreciate your time and thoughts.

Try moving the comments.php template to the theme root and change any path references accordingly.

Hi Foxaii, thanks for your suggestion.

I did as you suggested and moved the templates/comments.php to the theme root, this seemed to do the trick as long as I also replaced comments_template('/templates/comments.php'); with comment_form();. However, I did get the following error afterwards:

Notice: Theme without comments.php is deprecated since version 3.0 with no alternative available. Please include a comments.php template in your theme. in /Applications/MAMP/htdocs/phpLocalhost/wordpress-roots/wp-includes/functions.php on line 3136

This was puzzling as I clearly have comments.php in the theme root and it is displaying the comments (although they have lost all their styling), any thoughts on what’s going on there?

Ok, I uploaded the current theme to a live server and the Notice error I was getting is no longer there. I know this is because WP_DEBUG is set to false on my live test server. I guess my next question is, is this an acceptable compromise to actually eliminating the Notice all together?

Ideally I’d like no, Notices at all but since all the functionality is still there and this isn’t an theme breaking error, should I just ignore it?

If the comments.php file is in the theme root you shouldn’t be getting that notice; it’s the standard location for it.

It shouldn’t matter either way but it would be good to know why the error is being wrongly thrown.