Products » Support Forums 

Support Forums

HomeHomeDotNetNuke Modu...DotNetNuke Modu...Google Sitemap ...Google Sitemap ...Priority values in GoogleSiteMap.axd have comma not decimal dotPriority values in GoogleSiteMap.axd have comma not decimal dot
Previous
 
Next
New Post
2/25/2010 10:46 AM
 

I'm  running a DNN site (5.2.3, with only Croatian localization) an latest GSP, when I go to Google Webmaster tools I get message that the priority values are invalid.

I checked my SQL DB and they are all with comma witch is do to localization witch can not be changed. Is there a way to change the output of GoogleSiteMap.axd to decimal point not comma?

 

 
New Post
3/2/2010 4:55 AM
 

I will have to take a look at this.  I may be using a .net inbuilt number format routine, which is why you'd be getting the , instead of a . - the solution will be to either change to use a different routine, or force the format to ignore localisation.


Chief Software Hacker
 
New Post
3/3/2010 11:24 AM
 

Would be great! Looking forwrad to it.

BTW - I'm subscribed to this post but I didn't get notification on your reply.

 
New Post
3/11/2010 1:28 PM
 

Bruce Chapman wrote

I will have to take a look at this.  I may be using a .net inbuilt number format routine, which is why you'd be getting the , instead of a . - the solution will be to either change to use a different routine, or force the format to ignore localisation.

Any chance of getting a Culture invariant version of the GoogleSitemapProvider module?

I have tryed to do it myself but my programing skills are very basic.

I have found in GoogleSitemapProvider.cs around line 730 the routine that pulls out the PagePriority from the DB

public double GetTabPriority(double defaultPriority, TabInfo ti)
        {
            //use reflection to get the Sitemap Priority from the TabInfo object, and if it's not there, return the default priority
            System.Reflection.PropertyInfo pi = typeof(TabInfo).GetProperty("SiteMapPriority");
            if (pi == null)
                return defaultPriority;
            else
            {
                float priority = (float)pi.GetValue(ti, null);
                double result = Convert.ToDouble(priority);
                return System.Math.Round(result, 2);
                //return result;
            }
        }

I have tryed to change:

double result = Convert.ToDouble(priority);

to:

double result = Convert.ToDouble(priority, System.Globalization.NumberFormatInfo.InvariantInfo);

The only result I got was that the numbers got converted to whole numbers (0,5 = 5).

Please help me out with this.

 

 
Previous
 
Next
HomeHomeDotNetNuke Modu...DotNetNuke Modu...Google Sitemap ...Google Sitemap ...Priority values in GoogleSiteMap.axd have comma not decimal dotPriority values in GoogleSiteMap.axd have comma not decimal dot


Support Guidelines.. Please read before posting

To get support on iFinity products and services, please search the forums for the the answer to the problem you are seeking. If you cannot find a solution, post a question in the relevant forum.   Ensure that you specify the relevant versions of the problem, and the actual error message or a detailed description of the problem.    You will need to register with this site to post on the forum.  If you have a Microsoft Live (Hotmail/Passport) account you can use that.  If you have a Open Id account you can use that.  If you neither of these, you will need to register a user Id and password.