Author Topic: Facebook Comment Plugin Causes Feed Invalidation  (Read 1090 times)

mitchgroup

  • Newbie
  • Posts: 1
Facebook Comment Plugin Causes Feed Invalidation
« on: December 23, 2011, 08:17:27 am »
So I use the Facebook Comment plugin on my wordpress site and today I kept getting this error when trying to validate my feeds     line 61, column 18: slash:comments must be a non-negative integer: [help]

              <slash:comments></slash:comments>
                          ^


___________
as a non-technical person, this is obviously above my pay grade...but logically comments = fb comments plugin = deactivate = solved.  FYI.  I will alert those folks who make that plugin but bottom line here seems like powerpress is dead in the water when this is enabled unless there's a workaround you would suggest.  It invalidate the regular RSS feed as well.  Of course, that feed works fine in a reader, etc. but i couldn't validate w/iTunes with this thing activated. thanks all.

Todd

  • Administrator
  • Sr. Member
  • *****
  • Posts: 418
Re: Facebook Comment Plugin Causes Feed Invalidation
« Reply #1 on: December 26, 2011, 05:18:15 pm »
After the team gets back from vacation next week, we will look into it.. With as many plugins out there it sometimes is a challenge.

Thanks for the heads up..

mgdell

  • Blubrry Customer Support Coordinator
  • Administrator
  • Hero Member
  • *****
  • Posts: 3318
Re: Facebook Comment Plugin Causes Feed Invalidation
« Reply #2 on: December 30, 2011, 08:07:32 am »
Does the feed validate?  If so, and it's just an error, I wouldn't worry about it.  As long as the feed works, then there shouldn't be a problem.

IF it doesn't validate, we will test it.   Send me an email (mike [at] Rawvoice.com) with your website address and what facebook comment plugin you are using and I will look at it.  I'm using a facebook comment plugin on one of my sites and it doesn't seem to cause any problems with the feeds.

-Mike

riordan

  • Newbie
  • Posts: 2
Re: Facebook Comment Plugin Causes Feed Invalidation
« Reply #3 on: January 26, 2012, 10:52:59 am »
The feed doesn't validate, which is preventing me from importing the feed into HootSuite for auto posting.  It looks like the program is leaving the <slash:comments /> as a single closing element instead of being what it should be: <slash:comments>0</slash:comments> where zero is the number of posts the plugin sees.  A fix would be greatly appreciated!  I'll be looking into this issue as well, trying to find which file modifies the RSS feed, but it'd be great if you guys could take a look being that you're so familiar with the plugin :D!

riordan

  • Newbie
  • Posts: 2
Re: Facebook Comment Plugin Causes Feed Invalidation
« Reply #4 on: January 26, 2012, 11:35:43 am »
I've developed a temporary fix for anyone struggling with this issue:

On line 15 of the file facebook-comments-combinecomments.php we have this:
Code: [Select]
function fbComments_getProperCommentCount($fbCommentCount=0, $wpCommentCount=0) {
Now, in theory this should work as long as we can guarantee that the arguments $fbCommentCount and $wpCommentCount are positive integers. However, sometimes, for whatever reason, this isn't the case and things like empty strings are being passed. Because the argument has a value when the function is called, it's not being set to 0.  Adding these two lines to the beginning of the function fixed the validation errors for me by ensuring that the arguments are positive integers, and if not, setting them to 0:

Code: [Select]
function fbComments_getProperCommentCount($fbCommentCount=0, $wpCommentCount=0) {
if(!is_int($fbCommentCount) || $fbCommentCount < 0) $fbCommentCount=0;
if(!is_int($wpCommentCount) || $wpCommentCount < 0) $wpCommentCount=0;

Hope that helps anyone with the issue! I can finally import my feed into HootSuite!  ;D
« Last Edit: January 26, 2012, 11:44:44 am by riordan »

angelo

  • CIO, RawVoice
  • Administrator
  • Hero Member
  • *****
  • Posts: 4483
Re: Facebook Comment Plugin Causes Feed Invalidation
« Reply #5 on: January 26, 2012, 02:09:57 pm »
What plugin has facebook-comments-combinecomments.php in it? This isn't in the stock WordPress install, and it is definitely not part of PowerPress.

angelo

  • CIO, RawVoice
  • Administrator
  • Hero Member
  • *****
  • Posts: 4483
Re: Facebook Comment Plugin Causes Feed Invalidation
« Reply #6 on: January 27, 2012, 09:01:20 am »
Sorry I miss-understood, the plugin is called "Facebook Comment plugin". :)