Support Forum

Sitemap generation

BM Bill Murray
Bill Murray
Member

It looks like 5.0 supports an XML sitemap only if Google XML Sitemap is the plugin that generates it.  For multisite users and users that want to use custom post types, that’s a minor issue, because the plugin doesn’t support those things out of the box.  The multisite capable version is only in beta and, although the beta version works, it hasn’t received a lot of attention of late.  There are also reasons why using a sitemap plugin that is separate from SEO settings is less than ideal; the sitemap generates links for content that you may have marked noindex from an SEO basis.

Fixing that last problem is one of the big advantages of Yoast’s WordPress SEO plugin, which combines SEO with a sitemap generator.  Any thoughts on sitemaps other than Google XML Sitemap?  If not, how would a search engine find the forum content?

18 Answers

New Answer

MP Mr Papa
Mr Papa
Member

simple press has long worked with the google XML sitemap plugin for generating an xml sitemap…  That is NOT new for 5.0…

The biggest problem is that most of the sitemap plugins do not know about simple press and do not give us a method for telling them about extra content…  Long ago we worked with Arne (google xml sitemap author) and he incorporated a hook for other plugins to call and have a sitemap generated with additional pages and data…

If the Yoast SEO plugin does the same thing, ie has hooks for other plugins to affect the content of the sitemap, we could add that too…

but even better with 5.0, if Yoast SEO does that, it would be a very simple plugin for SP to add it…

BM Bill Murray
Bill Murray
Member

I don’t think I said support for Google XML Sitemaps was new, just that looking forward from today, I’m not sure if it is the best choice. I use Arne’s plugin, but I think there are very good arguments that SEO and sitemap generation should be connected. 

I agree with you that sitemap generation should be in a plugin.  How about putting support for Google XML Sitemaps in a plugin?  If you do that, I’ll make a stab at creating a plugin for Yoast’s WordPress SEO.  I think his plugin has the necessary hooks, and if it doesn’t I’ll reach out to him to see if he’ll add them.

MP Mr Papa
Mr Papa
Member

we can talk about it… the only issue is that it could be bad not to support any sitemap generation directly…

will try to look at it more this weekend…  back at work this week (vacation was fun last week!) so limited time during the week…

MP Mr Papa
Mr Papa
Member

FYI…  I have opened a ticket on this topic so we dont forget about it…

http://mantis.simple-press.com/view.php?id=2324

BM Bill Murray
Bill Murray
Member

Genesis faces a similar thing with SEO settings.  They are there by default, but if you activate another SEO plugin, they turn off.  You could do a similar thing; load support for Arne’s plugin, but turn it off if another sitemap plugin is installed.  Personally, if it is documented for an installation (ie, tell users to pick the sitemap plugin that corresponds to the sitemap they are using for their general site), I think that is good enough, and I think it leverages SPF’s plugin model.

MP Mr Papa
Mr Papa
Member

how would we know if another sitemap plugin was activated????  that would require some sort of common api or worse, us keeping a list of other potential sitemap plugins…  the latter seems fraught with issues…

still need to finalize with Andy, but the idea of moving current sitemap integration to a plugin is gaining traction…

BM Bill Murray
Bill Murray
Member

Mind you, I am not recommending this approach, because I think all sitemap generation for SPF should be in a plugin, with docs telling you to activate one of the available plugins.  If SPF is not going to “ship” with every plugin, it could ship with the plugin you create for Arne’s sitemap generator.  The way all plugins are zipped up is fine, but when you finally release 5.0 you don’t have to include every plugin in the download as long as there are clear docs on where to get new ones and how to add them.

For SPF to do a check, I wasn’t referring to other WP plugins generally, but just SPF plugins.  The way Genesis handles it is to keep a list of SEO plugins that are checked; it’s not every SEO plugin, just the big 6 or so.  If one of them is activated, Genesis turns off its own SEO.  Genesis does this check by looking for the existence of certain functions or constants, plugin by plugin.  This model can work in SEO because there are a variety of SEO options.  I would be hard-pressed to name another potential sitemap generator candidate for SPF beyond Arne’s plugin and Yoast’s WordPress SEO.

MP Mr Papa
Mr Papa
Member

Bill Murray, today I have committed changes which remove the sitemap functionality from core and moved it to a plugin…  so if you svn up core and plugins, you should get it…  you will have to activate the plugin for it to function…

as discussed, it works with the google xml sitemap plugin from Arne Bracchold…  It should be fairly easy to convert to another plugin if it provides hooks into its sitemap generation process…  really only two functions that interact…

let us know if you give it a shot…  here to help if needed…

BM Bill Murray
Bill Murray
Member

Wow, fast response.  I think this is a great change.  Now, I have to step up and plagiarize 2 or 3 lines of code and produce that plugin for Yoast’s WordPress SEO. 

I did test it, and the good news it works.  I am running version 4.0 beta 7 of Google XML Sitemaps.  Version 4.0 is required for multisite.  It works a little differently from prior versions, where the sitemap is virtual and broken up, first by month.  There is also a misc.xml file, and this is where the forum posts go.  I got a post on my test forum, and it was successfully put in the sitemap.  So far, so good.

For the to be explored/resolved, let me start by saying I am on build 7101, updated from SVN sometime on Sat around 4 or 5 pm eastern time.  The guest poster that made the post didn’t register, so presumably his post would have been held for moderation, right?  But it is in the sitemap.  I figured I would need to approve this post, and couldn’t find a way to do it on the backend, so I activated the admin toolbar plugin.  At that point, every refresh of the forum triggers an invalid database query in red in the upper left.  And this is in the error log:

file: /problem-with-post-edit-buttonome/qbg/qbgarage.com/wp-content/sp-resources/forum-plugins/admin-bar/library/sp-admin-bar-components.php

line: 62

function: sp_GetAdminsQueuedPosts

error:

SELECT wp_sfwaiting.forum_id, forum_slug, forum_name, topic_status_set, topic_id, wp_sfwaiting.post_count, wp_sfwaiting.post_id FROM wp_sfwaiting LEFT JOIN wp_sfforums ON wp_sfwaiting.forum_id = wp_sfforums.forum_id ORDER BY forum_id

 

At the top of the forum, when logged in as an admin, I see that there are 0 posts that need moderation, but if I view the forum as a guest, I don’t see the post.

So, why is it in the sitemap if it is held for moderation?  If it is not held for moderation, why is not showing on the front end to guest visitors?  I did receive an email saying the post is awaiting review.  Is the admin bar plugin the only way to moderate posts?

MP Mr Papa
Mr Papa
Member

wow, where to start? wink

first, posts are only held in moderation if you have the permissions set up that way…  guests are not necessarily moderated unless you make the permissions so…  so check the permissions set you have assigned for the guests usergroup and see if you have them set up to have posts moderated.

If a posts needs moderation, when you visit the topic, above the post content, you will see a notification that the post is in moderation… as admin, you will also see the post content…  non admins or mods will not see the post content…

I am not sure what you mean by email saying post ready for review… the admin notification email does not contain any such wording…  it does contain a link to the new post…

the admin bar is not the only way to moderate a post…  from the topic view, you can moderate posts with the forum tools…

So the post in question was a new topic?  keep in mind that the site map only contains links to the topics, not posts… so if the topic already existed when a post in the topic went into moderation, the topic would already be in the sitemap…  If the moderated post was a new topic, it should not go in the sitemap…  but frankly, do not know for sure if we check that…  I will do so… 

and when a new topic gets added to the sitemap is up to you based on the options…  It can be immediately (well, when the wp cron runs so nearly immediately) or done once per day for all new topics…

build 7101 is the latest for this stuff… no updates to the plugin or core regarding the sitemap since then…  or the admin bar for that matter…  assuming you also did an svn up on the plugins…

I will have to research the error message a bit as we dont see that on our test sites or here obviously…  can you tell me what you have set for options on forum – admins – global options and forum – admins – your options?

MP Mr Papa
Mr Papa
Member

ah, topic set status should not be in that query…  its now in a plugin… will get that fixed up…

works for us because we would have that in our table from version 4.4.5…

BM Bill Murray
Bill Murray
Member

I just sent you a PM with admin access to the site. 

#1, the email I received does contain the phrase “awaiting review”.

#2, I don’t see permissions for User Groups.  I have the forum set to Standard Access, so the permission was probably set to not moderate.  I will have to test this out once I revise the permissions.

#3, Since the post wasn’t being held for moderation, that’s probably why I wasn’t seeing those options.

#4, Since I didn’t see the post when I opened another browser as guest, I assumed it was because the post was held for moderation.  Yes, it was a new topic, but it seems that was allowed by the permissions.

#5, I don’t update the SVN every night, but when I do update, I update everything.  I can disable the admin bar for now, and update the SVN tomorrow.

MP Mr Papa
Mr Papa
Member

#1 found it… the admin bar adds that snippet and I just searched core for it originally… still getting used to having to search three places… but it says awaiting review and not in moderation…  so any posts in the admin queue would be in that count…  depending on how you configure the admin options I inquired about, the admin bar may contain unread and posts needing moderation… the best benefit of the admin bar is a central location of all posts on your site that an admin or moderator has not seen or responded too – not just posts in moderation…

#2 permissions and usergroups are combined on forums – forums – manage groups and forums…  you assign a usergroup and permission to each forum… you set up defaults for new forums at the group level…  the default for Standard Access is no moderation…

#3 correct…

#4 checking on the new topics in moderation and the sitemap…  will update if needed and realistically feasible to do so…

#5 cool. as I said the fix for the admin bar error you reported is already there…  no worries on timing of svn updates…