• Resolved fpg

    (@fpg)


    Hey All,

    I was trying to import my feed into HootSuite but I kept getting issues with this plugin and trying to validate the feed. It wouldn’t return the comment number, so my RSS2 feed had a bunch of lines like this:

    <slash:comments></slash:comments>

    <slash:comments> must contain a positive integer in order to be valid, so I dove into the code, and found out the issue. Line 15 of the facebook-comments-combinecomments.php file:

    function fbComments_getProperCommentCount($fbCommentCount=0, $wpCommentCount=0) {

    The problem is, in many instances this function was being called with values like empty strings. Because the values were being set, the default value wasn’t set and the empty string was returned.

    Just add the following two lines at the beginning of the function and it will fix your RSS feed issues:

    function fbComments_getProperCommentCount($fbCommentCount=0, $wpCommentCount=0) {
    	if(!is_int($fbCommentCount) || $fbCommentCount < 0) $fbCommentCount=0;
    	if(!is_int($wpCommentCount) || $wpCommentCount < 0) $wpCommentCount=0;

    Hope this helps! While this doesn’t fix the underlying problem, it will at least always return a 0 instead of nothing.

    http://wordpress.org/extend/plugins/facebook-comments-for-wordpress/

The topic ‘[Plugin: Facebook Comments for WordPress] RSS Feed doesn't validate:’ is closed to new replies.