• Feed Validator returns an error “wfw:commentRss must be a full and valid URL:”
    The line is: <wfw:commentRss></wfw:commentRss> url is missing.
    It is not getting the comment url.

    Anyone else having this problem?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    What is the URL of the feed you’re testing?

    Thread Starter jwertin

    (@jwertin)

    Hi James,

    The url is:
    http://focalpointministries.org/feed/podcast/

    After posting this I was able to hard code a comment url that validated the feed. Prior to that the Word Press function was not grabbing the a comment feed.

    Not the best solution, but it got it working again. I fear it will break at the next WP update.

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Ok, hard to check now that you’ve changed it. 🙂

    I’d suspect that the comments feed URL was empty because there were no comments.

    Thread Starter jwertin

    (@jwertin)

    I understand.

    I actually added comments, but it still didn’t pull the comment feed url. It did show the number of comments in the slash:comments line item though. So I assume it was acknowledging there was a comment.

    Here is the code that we changed.

    <wfw:commentRss><?php echo esc_url( get_post_comments_feed_link(null,
    ‘rss2’) ); ?></wfw:commentRss>

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Hm, that should have worked, but you have fixed it now at least. 🙂

    When you update WordPress next, the file you changed will be replaced, so you’ll have to change it again. Maybe, when that happens, re-visit here so we can take a look?

    @jwertin, where did you change that code? Is that in a core file somewhere? Can we come up with a fix to put in functions.php?

    I don’t understand how/where RSS feeds are generated in WP. Have had this problem for years. Is this a genuine WP bug?

    In my case, this function in feedwordpress.php seems to be the source of the problem:

    /**
     * syndication_comments_feed_link: Escape XML special characters in comments
     * feed links
     *
     * @param string $link
     * @return string
     *
     * @uses is_syndicated()
     * @uses FeedWordPress::munge_permalinks()
     */
    function syndication_comments_feed_link ($link) {
    	global $feedwordpress_the_original_permalink, $id;
    
    	if (is_syndicated() and FeedWordPress::munge_permalinks()) :
    		// If the source post provided a comment feed URL using
    		// wfw:commentRss or atom:link/@rel="replies" we can make use of
    		// that value here.
    		$source = get_syndication_feed_object();
    		$replacement = NULL;
    
    		if ($source->setting('munge comments feed links', 'munge_comments_feed_links', 'no') != 'no') :
    			$commentFeeds = get_post_custom_values('wfw:commentRSS');
    			if (
    				is_array($commentFeeds)
    				and (count($commentFeeds) > 0)
    				and (strlen($commentFeeds[0]) > 0)
    			) :
    				$replacement = $commentFeeds[0];
    
    				// This is a foreign link; WordPress can't vouch for its not
    				// having any entities that need to be &-escaped. So we'll do it
    				// here.
    				$replacement = esc_html($replacement);
    			endif;
    		endif;
    
    		if (is_null($replacement)) :
    			// Q: How can we get the proper feed format, since the
    			// format is, stupidly, not passed to the filter?
    			// A: Kludge kludge kludge kludge!
    			$fancy_permalinks = ('' != get_option('permalink_structure'));
    			if ($fancy_permalinks) :
    				preg_match('|/feed(/([^/]+))?/?$|', $link, $ref);
    
    				$format = (isset($ref[2]) ? $ref[2] : '');
    				if (strlen($format) == 0) : $format = get_default_feed(); endif;
    
    				$replacement = trailingslashit($feedwordpress_the_original_permalink) . 'feed';
    				if ($format != get_default_feed()) :
    					$replacement .= '/'.$format;
    				endif;
    				$replacement = user_trailingslashit($replacement, 'single_feed');
    			else :
    				// No fancy permalinks = no problem
    				// WordPress doesn't call get_permalink() to
    				// generate the comment feed URL, so the
    				// comments feed link is never munged by FWP.
    			endif;
    		endif;
    
    		if (!is_null($replacement)) : $link = $replacement; endif;
    	endif;
    	return $link;
    } /* function syndication_comments_feed_link() */

    This function is hacking around some WordPress issue – ‘Q: How can we get the proper feed format, since the format is, stupidly, not passed to the filter?’

    A PHP Fatal error is caused by the line if ($source->setting('munge comments feed links ... -> Call to a member function setting() on a non-object

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘wfw:commentRss Not pulling url’ is closed to new replies.