SOLVED: Error loading stylesheet: An unknown error has occurred (805303f4)

Ever get this type of error after installing Google XML Sitemaps plugin. There is a very easy fix to this issues. Simply, login to your FTP account or file manager and just change the sitemap filename from sitemap.xml to example.xml or site-map.xml and Rebuild it. A very small bug can cause this problem.

Error loading stylesheet: An unknown error has occurred (805303f4)
http://www.domain.com/blog/wp-content/plugins/google-sitemap-generator/sitemap.xsl

SOLVED: Error loading stylesheet: An unknown error has occurred (805303f4)

Or second option:

Loon in your wordpress plugin plugin folder for the file below and edit sitemap-core.php:
Full path : /wp-content/plugins/google-sitemap-generator/sitemap-core.php 

Find the following code :
function GetPluginUrl() {
//Try to use WP API if possible, introduced in WP 2.6
if (function_exists(‘plugins_url’)) return trailingslashit(plugins_url(basename(dirname(__FILE__))));
//Try to find manually… can’t work if wp-content was renamed or is redirected
$path = dirname(__FILE__);
$path = str_replace(“\”,”/”,$path);
$path = trailingslashit(get_bloginfo(‘wpurl’)) . trailingslashit(substr($path,strpos($path,”wp-content/”)));
return $path;
}

And REPLACE it with this:
function GetPluginUrl() {
//if (function_exists(‘plugins_url’)) return trailingslashit(plugins_url(basename(dirname(__FILE__))));
$path = dirname(__FILE__);
$path = str_replace(“\”,”/”,$path);
//$path = trailingslashit(get_bloginfo(‘wpurl’)) . trailingslashit(substr($path,strpos($path,”wp-content/”)));
$path = trailingslashit(substr($path,strpos($path,”wp-content/”)));
return $path;
}


This should do the trick.

5 replies
  1. Travis Van Slooten
    Travis Van Slooten says:

    Thanks for posting this! I've been racking my brains over this. This plugin has been rock solid for years. This is the first time I've been seeing this bug. Oh well, all fixed now. Thanks!

    Travis Van Slooten

  2. Unknown
    Unknown says:

    My blog sitemap couldn't work properly as it kept giving the above error message. I tried so many things but they didn't work. Yours worked perfectly. You are a genius. Thanks for sharing.

  3. Unknown
    Unknown says:

    I am getting this message when I want to view a sitemap in www website webmaster tools. I am using non www version of the website and when I view sitemap there all is working but in www it has error.

Comments are closed.