• Resolved pedroantunes

    (@pedroantunes)


    My feed returns me a error:

    “This feed does not validate.

    line 677, column 2: XML parsing error: <unknown>:677:24: unclosed CDATA section”

    What can I do??? I dont understand nothing about coding… please help me, I want to have a feed :,(

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter pedroantunes

    (@pedroantunes)

    working now!

    The YARPP plugin was messing up the code… I will have to find another related posts plugin ??

    the-secret-cash-builder

    (@the-secret-cash-builder)

    I am having this same problem when the yet another related post plug-in is activated.

    Anybody have any idea how to fix this?

    Thanks!

    This is sort of a “hacked” way of doing this, but it solved the problem for me when viewing RSS feed pages.

    Open the main plugin file – yarpp.php – and right about the line require_once(‘includes.php’), add these lines:

    $url = $_SERVER['REQUEST_URI'];
    $split = explode('/', $url);
    if ($split[sizeof($split)-1] != 'feed') {

    and then at the bottom of that file add the closing brace. So any page you go to that ends in /feed will not load the YARPP plugin. Should work for most cases unless you have a post titled “feed” or something crazy like that.

    So with the version I am using the entire file would be

    <?php
    /*
    Plugin Name: Yet Another Related Posts Plugin (uwemp modified)
    Plugin URI: https://mitcho.com/code/yarpp/
    Description: Returns a list of the related entries based on a unique algorithm using titles, post bodies, tags, and categories. Now with RSS feed support!
    Author: mitcho (Michael Yoshitaka Erlewine)
    Author URI: https://mitcho.com/
    */
    // Do NOT load plugin for feed pages
    $url = $_SERVER['REQUEST_URI'];
    $split = explode('/', $url);
    if ($split[sizeof($split)-1] != 'feed') {
    	require_once('includes.php');
    	require_once('related-functions.php');
    
    	add_action('admin_menu','yarpp_admin_menu');
    	add_action('admin_print_scripts','yarpp_upgrade_check');
    	add_filter('the_content','yarpp_default',1200);
    	add_filter('the_content_rss','yarpp_rss',600);
    	add_filter('the_excerpt_rss','yarpp_rss_excerpt',600);
    	register_activation_hook(__FILE__,'yarpp_activate');
    
    	load_plugin_textdomain('yarpp', PLUGINDIR.'/'.dirname(plugin_basename(__FILE__)), dirname(plugin_basename(__FILE__)).'/lang',dirname(plugin_basename(__FILE__)).'/lang');
    
    	// new in 2.0: add as a widget
    	add_action('plugins_loaded', 'widget_yarpp_init');
    }
    ?>

    Hope that helps!

    Doesn’t simply turning off the “display related posts in RSS” option in YARPP fix this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘feed not working! unclosed CDATA section’ is closed to new replies.