WordPress.org

Ready to get started?Download WordPress

Forums

Simple Google Sitemap XML
Plugin breaks WP when short_open_tag = Off (2 posts)

  1. jnovak
    Member
    Posted 3 years ago #

    After troubleshooting this error after a PHP upgrade:

    [Wed Jan 12 12:38:49 2011] [error] [client 173.234.28.48] PHP Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/blog/wp-content/plugins/simple-google-sitemap-xml/simple-google-sitemap-xml.php:156) in /usr/local/www/blog/wp-comments-post.php on line 96

    I was able to narrow it down to the following php.ini file variable. When "short_open_tag = Off", the Simple Google Sitemap plugin breaks because the plugin author has mixed <?php and <? tags throughout the file.

    The solution was to change <? to <?php wherever it occurred in the file (except for line 65, which is this in my version:
    $xmlcontent = '<?xml version="1.0" encoding="UTF-8"?>'."\n";)

    http://wordpress.org/extend/plugins/simple-google-sitemap-xml/

  2. Tilex
    Member
    Plugin Author

    Posted 3 years ago #

    OK thanks for pointing it out, I fixed it !

    Alex

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic