interactive. media. development.

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


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 comments:

Travis Van Slooten said...

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

Anonymous said...

I tried option one, it did not work...

Sean said...

What does it when its not working ? Are you getting any messages?

Dick Beaulieu said...

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.

Martina Valachova said...

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.

Post a Comment

Speak Your Mind

© Copyright Triple ROI
165 Tremont St Boston, MA 02111 - Suite 3

Wordpress Design Services | Boston Website Programmer | Modern Website Design | Shopping Cart Boston | Start an Online Store
Terms of Use | Privacy Policy