Forums

Sitemap

This question is answered

I just upgraded to CS 2008.5 SP1. Whenever I submit my sitemap to Google, the Google Webmasters dashboard indicates there are errors in the sitemap.

When attempting to access the sitemap for a section such as blogs, media, wiki (e.g. http://www.site.com/SiteMap.ashx?apptype=wiki&app=start ) I get the standard error message "Sorry, there was a problem with your last request! Either the site is offline or an unhandled error occurred. We apologize and have logged the error. Please try your request again or if you know who your site administrator is let them know too."

The exceptions log contains the following:

User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET C
Path: /SiteMap.ashx?apptype=wiki&app=start as HTTP GET
Referrer:
Message: Requested value 'wiki' was not found.
System.ArgumentException: Requested value 'wiki' was not found.
at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)
at CommunityServer.Components.CSContext.get_ApplicationType()
at CommunityServer.Components.UserCookie..ctor(User user)
at CommunityServer.Components.UserLastVisitModule.csa_UserKnown(User user, CSEventArgs e)
at CommunityServer.Components.CSUserEventHandler.Invoke(User user, CSEventArgs e)
at CommunityServer.Components.CSApplication.ExecuteUserEvent(Object EventKey, User user, ObjectState state, ApplicationType appType)
at CommunityServer.CSHttpModule.Application_AuthorizeRequest(Object source, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Any suggestions on how I can resolve this issue?

 

Verified Answer
All Replies
  • Unfortunately it looks like the enum parse on application type is not case-insensitive. Try using appType=Wiki

     

    Jeff.

  • Thanks Jeff. That worked.

    Since I'm submitting http://www.site.com/sitemapindex.ashx to Google and it's generating the sitemap for me, is there a way I can resolve this for all sitemaps generated on site.com/sitemapindex.ashx ?

     

  • [EDIT] - As I look at it more, I think there are some problems here that cannot be solved without Telligent. I have submitted to a Telligenti for some further thought on this subject.

    Url rewriting would be my first option. The actual code is way down in the SDK in CSContext.

    I believe it would have to be a custom http module because the redirects available via SiteUrls override are case-insensitive.

  • Hopefully Telligent can release a fix.

     

  • In SiteUrls.config, change the "siteMap" url by changing "appType" to just "type".  It should look like this:

        <url name="siteMap" path="SiteMap.ashx?type={0}^{1}={2}" />

    In sitemap.ashx.cs, change the line of code referring to "appType" to refer to just "type".  It should look like this:

        string appType = Context.Request.QueryString["type"];

    This will not only fix the exception, but it will also correctly limit the sitemap entries referring to tags.  It will limit the entries to just the tags within the section, and not to all the tags with in the apptype.

    --Troy

  • I also changed the line of code that looks like this:

         Permissions.AccessCheck(mediaGallery, Permission.Read, context.User);

    to look like this:

         Permissions.AccessCheck(mediaGallery, Permission.View, context.User);

    I think most sites have it so that a user can browse to a media file, but that you need to login to view the file.  This will allow such media galleries to have a sitemap.

    --Troy

  • Thanks for the fixes Troy.

    Can anyone from Telligent confirm if a patch will be released for this or if site owners have to fix this themselves?

     

  • Any suggestions?

     

  • I personally have not yet heard back.

    While I don't normally recommend hacking the SDK source, if you really must get up to SP1, then that's what I would do. 

     

  • The 2 fixes I mentioned previously to the file "sitemap.ashx.cs" do not require the SDK. 

    --Troy

  • A little off topic, but for the sake of discussion, I use the compiled CommunityServer.Web assembly as an SDK source, and leave the cs files out of my implementations.

    So I guess the real distinction I am making is that I prefer not to recompile the given source from telligent; only to work in my own code, and to implement extensions. It makes upgrading more reliable.

    In the end, you have to do what you have to do.

  • I upload a temporary fix files ( http://dev.communityserver.com/members/pcvpcv/files/CS2008.5_5F00_SP1_5F00_31106_5F00_SiteMap_5F00_Fix.zip.aspx )

    You can download it and replace old file .

    Code Highlight / Syntax Highlighter CSModule and More CS tools ,Visit Rurisoft Update Service

  • This issue has been logged - http://dev.communityserver.com/forums/p/504490/639387.aspx#639387 .

  • Thanks for that patch; it worked a treat.

    MPT

    http://PlanetTesla.com

  • I'm getting the same errors as well in my log (2008.5 SP1)