WordPress.org

Ready to get started?Download WordPress

Forums

127

Google XML Sitemaps
Early testers wanted (200 posts)

  1. Arnee
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    I'm currently working on a new version of the plugin which will have some major changes. To test this new features, I need your help. You can grab the new version here:

    http://www.arnebrachhold.de/redir/sitemap-dl-beta/

    Please note that it is in a very early stage and not suitable for production sites. Please also note that you have to delete your sitemap.xml and sitemap.xml.gz after installation since they are not used anymore (but break the new plugin).

    What has changed:
    Dynamic sitemap generation
    There are no static files anymore. This will solve 99% of the problems users are having. All content is generated dynamically.

    Sitemap Index File
    To reduce the amount of needed CPU and memory, the sitemap is split into sub-sitemaps. The main sitemap file is now only a index file which links to them. With that change you can have an unlimited number of URLs as long as they are spread over multiple months.

    WordPress MU support
    Without having static files, MU and multi-site support is no problem anymore.

    New developer API
    With the new API, developers can build plugins which can create sub-sitemaps to support an unlimited number of items.

    Installation:

    • Install the plugin normally
    • Delete your existing sitemap.xml and sitemap.xml.gz
    • Browse to http://www.yourblog.com/sitemap.xml if using rewrite permalinks, or index.php?xml_sitemap=index if not.

    At the moment, WordPress 3.0 and PHP 5.2 is the only tested configuration. Please let me know if you have problems with other setups.

    http://wordpress.org/extend/plugins/google-sitemap-generator/

  2. Arnee
    Member
    Plugin Author

    Posted 3 years ago #

    Sorry, I forgot to mention that you have to rebuild your permalink structure in the WordPress Permalinks Option screen. This will happen automatically in a later release.

  3. ARYA-CLUB
    Member
    Posted 3 years ago #

    Hello

    How I Made the plugin Google-Sitemap-Generator to communicate

    Add Persian instrument made myself this plugin

    Fully compatible with new version 3.2.4

  4. avagogo
    Member
    Posted 3 years ago #

    Hi Arne - I can't this on production, but can I test on a localhost?

  5. Arnee
    Member
    Plugin Author

    Posted 3 years ago #

    sure :)

  6. war4gamerz
    Member
    Posted 3 years ago #

    I downloaded the new version, and manually uploaded it.

    It shows in the plugin list, but I get these errors:

    When I click on edit, I get a blank screen

    When I activate it, I get the following error

    Error 500 - Internal server error

    An internal server error has occured!
    Please try again later.

    Any ideas how to correct this?

  7. ARYA-CLUB
    Member
    Posted 3 years ago #

    hi

    File at your disposal

    http://up.iranblog.com/Files/8ab6c57d0cc44722847c.jpg

    This file associations in many Persian language and was used to explain

    Download compatible with version 3.2.4
    http://www.4shared.com/file/_94_HXot/sitemap-fa_IR.html
    or
    http://rapidshare.com/files/411033573/sitemap-fa_IR.zip

    Good luck

  8. noonoon
    Member
    Posted 3 years ago #

    hi arnee,

    thanks for the great contribution.. i just began to enable to multisite functions on wp and activated google sitemap plugin on 2 installation.

    the 1st one was fine.

    the 2nd one i got this when i click and try to view the sitemap.xml

    This page contains the following errors:

    error on line 4 at column 6: XML declaration allowed only at the start of the document
    Below is a rendering of the page up to the first error.

    and when i am in the plugin configuration page i will see this on the top -

    Notice: Only variable references should be returned by reference in /var/www/vhosts/diveasianow.com/httpdocs/wp-content/plugins/google-sitemap-generator/sitemap-core.php on line 42

  9. Adam Harley
    Member
    Posted 3 years ago #

    noonoon,

    The 'XML declaration' error sounds like a pretty common problem with some plugins/themes. You need to have a look for whitespace (extra lines or spaces) outside of the PHP tags of your active plugins and your theme's functions.php, as these all load when a sitemap is generated and will appear before the sitemap code (causing that error).

    I'm seeing that PHP notice too though.

  10. Scott Winterroth
    Member
    Posted 3 years ago #

    Super, Going to test it on WP3.0.1 MU with subdomains and mapped domains. Will report back.

  11. mmilan81
    Member
    Posted 3 years ago #

    Hi,

    I installed plugin but link http://www.myblog.com/sitemap.xml is not working. Permalinks structure is /%postname%.

    If I disable permalinks everything is working fine.

    Thanks,
    Milan

  12. Arnee
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    I've fixed some bugs and improved the permalink handling. Please download http://downloads.wordpress.org/plugin/google-sitemap-generator.4.0a2.zip and try it out. If the permalinks don't work, deactivate and activate the plugin to re-register them.

    Thank you very much for your help!

  13. mmilan81
    Member
    Posted 3 years ago #

    Hi,

    I had the same problem with permalinks but I have added few redirections in htaccess file and now is working.

    Thanks for excellent plugin :)

  14. ip00
    Member
    Posted 3 years ago #

    Hello,

    I have tried to submit my sitemap.xml to Google manually through Google Webmaster Tools, but it didn't work: Error message: "Sitemap is HTML Your Sitemap appears to be an HTML page. Please use a supported sitemap format instead."

    Submission of sub-sitemaps (eg: sitemap-posts-2010-08.xml) also resulted with same error message.

    Version used: 4.0a2

  15. Arnee
    Member
    Plugin Author

    Posted 3 years ago #

    @mmilan81: Any modification of the .htaccess shouldnt be needed. What exatcly did you change?

    @ip00: Thanks for the feedback, is the site online so I can have a look at the sitemap?

  16. ip00
    Member
    Posted 3 years ago #

    @arnee: Yes it is, check out: http://tzmatulji.hr/sitemap.xml

  17. ip00
    Member
    Posted 3 years ago #

    @arnee: I have created another sitemap for sub-blog account (WP3 Multisite) and google webmaster tools downloaded it successfuly (http://tzmatulji.hr/iznajmljivaci/sitemap.xml).

    But there is still no luck with main site sitemap, although I don't see any obvious problem.

  18. jgadbois
    Member
    Posted 3 years ago #

    Is this going to support custom post types?

  19. Arnee
    Member
    Plugin Author

    Posted 3 years ago #

    @ip00: Thank you very much for testing. I've changed some small things and the content-type of the XML sitemap to application/xml, can you try on the non-working blog again? Please make sure to resubmit your sitemap in the Webmaster Tools manually.

    http://downloads.wordpress.org/plugin/google-sitemap-generator.4.0a3.zip

    @jgadbois: I will focus on the core changes first, but this feature will come sooner or later.

  20. mmilan81
    Member
    Posted 3 years ago #

    @arnee
    I added this to htaccess

    RewriteRule ^sitemap.xml$ /index.php?xml_sitemap=index [R=301,L]
    RewriteRule ^sitemap-posts-([0-9]+)-([0-9]+).xml$ /index.php?xml_sitemap=params=posts-$1-$2 [R=301,L]

  21. ip00
    Member
    Posted 3 years ago #

    No arnee it didn't work. I deleted older version of your plugin from server, uploaded new one and activated it, added new post to generate new sitemap and submitted it manually go WMT.
    Is there anything else I should do? Plugin kept settings from old version even after it was deleted and reinstalled.

  22. Arnee
    Member
    Plugin Author

    Posted 3 years ago #

    @mmilan81: This rules should be automatically added to the WordPress redirect functions on plugin activation. Did you activate the plugin or just replaced the old files with the new version? In this case you could try to click the Save button on the WordPress permalink options page. There are more rules for sub-sitemaps than the two you've added manually, so changing the .htaccess by hand is a lot of work...

    ip00: Hmmm thats strange, Google still says it is HTML? The headers are sent correctly, I really have no idea whats wrong. Yes, the settings are kept from each version, so you won't lose them on an upgrade. There is a reset button at the end of the page, but I don't think that will change the content-type issue. :-(

  23. mmilan81
    Member
    Posted 3 years ago #

    @arnee
    I deactivated and deleted old version, than activated new. I tried to deatcivate & activate plugin few times, also changed link structure to default and back and problem was same.

    Temporarily solution was those two lines. I'll try ver 4.0a3 later.

  24. ip00
    Member
    Posted 3 years ago #

    Regarding my problem it was not related to this plugin, but WP redirect settings.

    Thanks, arnee

  25. qreus76
    Member
    Posted 3 years ago #

    Got it going on a couple of sites. Google is reading most of the sub-sitemap links from the main sitemap page but I'm getting a blank page with others. When I view the source i get this

    <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="http://www.myefficientenergy.com/wp-content/plugins/google-sitemap-generator/sitemap.xsl"?><!-- generator="wordpress/2.9.2" -->
    <!-- sitemap-generator-url="http://www.arnebrachhold.de" sitemap-generator-version="4.0alpha3" -->
    <!-- generated-on="August 23, 2010 7:01 pm" -->
    <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><br />
    <b>Fatal error</b>:  Allowed memory size of 67108864 bytes exhausted (tried to allocate 128 bytes) in <b>/mysite.com/wp-settings.php</b> on line <b>307</b><br />
  26. qreus76
    Member
    Posted 3 years ago #

    Also in firefox I get this error.

    XML Parsing Error: no element found
    Location: http://myblog.com/sitemap-posts-2010-01.xml
    Line Number 4, Column 236:<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^
  27. Arnee
    Member
    Plugin Author

    Posted 3 years ago #

    Please try the new version, hopefully this is fixed now :-)

    http://downloads.wordpress.org/plugin/google-sitemap-generator.4.0a4.zip

  28. Aaron D. Campbell
    Member
    Posted 3 years ago #

    Arnee: Custom post types didn't work for me, but I found the problem. Line 826 of sitemap-ui.php (the a4 build) says:
    if(count($taxonomies)>0) {
    And it should be:
    if(count($custom_post_types)>0) {

    Also, is there a reason that you limit support for custom taxonomies to be only taxonomies applied to posts? It seems like GetCustomTaxonomies() in sitemap-core.php should be:

    function GetCustomTaxonomies() {
    	$taxonomies = get_taxonomies();
    	return array_diff($taxonomies,array("category","post_tag","nav_menu","link_category"));
    }
  29. Aaron D. Campbell
    Member
    Posted 3 years ago #

    I appreciate the plugin. Thanks for all the hard work. Here are some more fixes I had to make. First, just to make the custom post type sitemap url work (http://shouldipourit.com/sitemap-beers-2010-08.xml) I had to edit sitemap-builder.php. In the switch statment in the Content() funtion I moved the posts and pages cases to the bottom and made that the default:

    case "posts":
    case "pages":
    default:
    	$this->BuildPosts($gsg, $type, $params);

    To make the index work (http://shouldipourit.com/sitemap.xml) I first added the processing for custom post types after the processing for posts and pages, but the code was basically all duplicate, so I remove the whole if (in_posts || in_pages) part of the Index() function in sitemap-builder.php and replaced it with this:

    $posttypes = $gsg->GetOption('in_customtypes');
    if ( !is_array($posttypes) ) {
    	$posttypes = array();
    }
    if($gsg->GetOption("in_pages")){
    	array_unshift($posttypes, 'page');
    }
    if($gsg->GetOption("in_posts")){
    	array_unshift($posttypes, 'post');
    }
    
    //Add filter to remove password protected posts
    add_filter('posts_search',array($this,'FilterPassword'),10,2);
    
    //Add filter to remove fields
    add_filter('posts_fields',array($this,'FilterIndexFields'),10,2);
    
    //Add filter to group
    add_filter('posts_groupby',array($this,'FilterIndexGroup'),10,2);
    
    foreach($posttypes as $posttype) {
    	$qp = $this->BuildPostQuery($gsg,$posttype);
    
    	$qp['cache_results']=false;
    
    	$posts = @get_posts($qp);
    	if ($posts) {
    		foreach ($posts as $arcresult) {
    			$gsg->AddSitemap($posttype.'s',sprintf("%04d-%02d",$arcresult->year,$arcresult->month), $gsg->GetTimestampFromMySql($arcresult->last_mod));
    		}
    	}
    }
    //Remove the filters again
    remove_filter('posts_where',array($this,'FilterPassword'),10,2);
    remove_filter('posts_fields',array($this,'FilterIndexFields'),10,2);
    remove_filter('posts_groupby',array($this,'FilterIndexGroup'),10,2);

    Everything seems to work as expected now.

  30. qreus76
    Member
    Posted 3 years ago #

    moved to 4.0a4 and got this error in the sitemap

    Fatal error: Cannot use object of type GoogleSitemapGenerator as array in /home/myblog.com/wp-includes/plugin.php on line 680

127

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic