WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] RSS feed xml parsing error (21 posts)

  1. befree22
    Member
    Posted 2 years ago #

    Hi Folks,

    Could someone help me fix this vexing issue with the rss feed xml parsing error below? I've spend too much time trying to troubleshoot it on my own.

    XML Parsing Error: XML or text declaration not at start of entity
    Location: http://www.denisejacksonmusic.com/feed
    Line Number 6, Column 1:<?xml version="1.0" encoding="UTF-8"?>
    ^

    I read http://wordpress.org/support/topic/rss-feed-isnt-working-xml-parsing-error?replies=14 but I've got WP 3.3.1. I read about the blank line error at http://feedvalidator.org/docs/error/WPBlankLine.html and check the following files for blank spaces after the ?> tag.

    wp-includes/feed.php
    /feed-rss2.php
    /feed-rss2-comments.php
    /feed-rss.php
    /feed-rdf.php
    /feed-atom.php
    /feed-atom-comments.php
    /rss.php
    /wlwmanifest.xml
    /functions.php

    wp-content/themes/denise/config.inc.php
    /functions.php

    I'd like to know which .php file is being referenced by the error code. All of the feed files above have the xml declaration in them.

  2. befree22
    Member
    Posted 2 years ago #

    w3it.org WordPress user, http://wordpress.org/support/topic/xml-error-reserved-xml-name-at-line-2-column-38-39?replies=7 solved the problem by applying this solution http://www.w3it.org/blog/wordpress-feed-error-output-solution-how-to/

    I wanted to add the following code to solve the problem but the feed files feed-rss2.php, feed-rss2-comments.php, feed-rss.php, feed-rdf.php, feed-atom.php, feed-atom-comments.php already contain a portion of the code.

    header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
    $more = 1;
    $out = ob_get_contents();
    $out = str_replace(array("\n", "\r", "\t", " "), "", $input);
    ob_end_clean();

    Could someone help me fix my xml parsing error?

    All of the WordPress 3.3.1 feed files start with the following code

    <?php
      /**
     * RSS2 Feed Template for displaying RSS2 Posts feed.
     *
     * @package WordPress
     */
    
    header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
    $more = 1;
    
    echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
  3. esmi
    Forum Moderator
    Posted 2 years ago #

    Never, ever, edit core WordPress files! Have you tried:

    - deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    - switching to the Twenty Eleven theme to rule out any theme-specific problems.

    - resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

  4. befree22
    Member
    Posted 2 years ago #

    I created a backup of my WordPress database so that I keep the settings on my plugins when I reactivate them but is it required to do a database backup when deactivating plugins?

  5. esmi
    Forum Moderator
    Posted 2 years ago #

    No.

  6. befree22
    Member
    Posted 2 years ago #

    I deactivated each plugin AND I installed the Default WordPress theme but I'm still getting the error. I'm surprised that the Default would return an error.

  7. befree22
    Member
    Posted 2 years ago #

    2011 is returning the same error. Now I'm very surprised. I have other sites using 2011 and I'm experiencing no problems.

    I just posted a question about a speech bubble not displaying on a 2011 child theme but a WordPress user could view the the speech ball on his end. I have a 1 month old computer, I'm using Firefox but I wonder why I'm unable to view the speech bubble.

    I will clear the cache and test 2011 again for the feed.

  8. esmi
    Forum Moderator
    Posted 2 years ago #

    1. You still have active plugins.

    2. Try checking your wp-config.php file.

  9. befree22
    Member
    Posted 2 years ago #

    I deactivated each plugin and reactivated it after checking the rss feed on the website. So you want me to deactivate them all and don't reactivate them?

    Do you want the wp-config.php code? I checked that there were no spaces outside the <? > tags.

  10. esmi
    Forum Moderator
    Posted 2 years ago #

    So you want me to deactivate them all and don't reactivate them?

    Yes.

  11. befree22
    Member
    Posted 2 years ago #

    I deactivated all of the plugins per this Codex entry

    Hence, the plugins folder is now plugins.hold

    I rechecked the feed and it's still returning an error with the plugins.hold

    There is no wp-config.php file in the themes folder. There is a config.inc.php and here's the code

    <?php
    global $options;
    foreach ($options as $value) {
    if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); } }
    ?>
  12. befree22
    Member
    Posted 2 years ago #

    The 2011 theme is also returning the rss xml error with the plugins.hold

  13. esmi
    Forum Moderator
    Posted 2 years ago #

    Now can we see your sit4e using the Twenty Eleven theme with all plugins deactivated, please?

  14. befree22
    Member
    Posted 2 years ago #

    2011 theme activated for you :)

  15. esmi
    Forum Moderator
    Posted 2 years ago #

    Try re-uploading all files & folders - except the wp-content folder - from a fresh download of WordPress.

  16. befree22
    Member
    Posted 2 years ago #

    Working on it...

  17. befree22
    Member
    Posted 2 years ago #

    Done. wp-admin, wp-includes, all .php files uploaded from fresh WordPress 3.3.1 install.

    Error establishing a database connection...

    I did a backup of wp-admin and wp-includes folders but not the .php files in the root folder. Do I have to reconnect the MySQL database in the webhost control panel?

  18. esmi
    Forum Moderator
    Posted 2 years ago #

    Error establishing a database connection

  19. befree22
    Member
    Posted 2 years ago #

    I just placed a request to tech support to restore the wp-config.php file in the root folder of my WordPress install.

  20. befree22
    Member
    Posted 2 years ago #

    Hi esmi,

    I forgot about the wp-config.php file -- my bad. You and your friend have been up all night helping me resolve this issue. And I see that you're in the UK -- you're really dedicated to WordPress and helping folks :)

    It may take the webhost 24 mins or 2 hrs or 12 hours to restore the wp-config.php file for me. I'm in the USA and I'll be back at this tomorrow.

  21. befree22
    Member
    Posted 2 years ago #

    Hi esmi,

    You fixed it and now it works perfectly! Thanks so much for your hard work.

Topic Closed

This topic has been closed to new replies.

About this Topic