Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peter 8 posts 88 karma points
    Sep 23, 2020 @ 05:37
    Peter
    0

    XML Site Map

    Hi all,

    I made the XML site map is based on the below link:

    https://our.umbraco.com/documentation/tutorials/Creating-an-XML-Site-Map/

    The result is always show:

    enter image description here

    When I changed var changeFreq = node.Value("searchEngineChangeFrequency", fallback: Fallback.To(Fallback.Ancestors, Fallback.DefaultValue),defaultValue:"monthly"); by var changeFreq = "monthly" is work well. I don't why? enter image description here

    When have done, I add a new sitemap to Google Search Console is the result with 61 errors. enter image description here

    enter image description here

    My sitemaps:

    https://vtltech.com.vn/xmlsitemap: 61 errors

    https://vtltech.com.vn/vn/xmlsitemap: 61 errors

    https://vtltech.com.vn/en/xmlsitemap: Ok

  • Marc Goodson 2155 posts 14408 karma points MVP 9x c-trib
    Sep 23, 2020 @ 08:00
    Marc Goodson
    100

    Hi Peter

    I think the errors flagged for the priority are that Google is expecting a number between 0 and 1

    and you have entered 0,5 using a comma instead of 0.5 using a period/full stop...

    So google is not intepreting what you have entered as a 'number' and is flagging the error.

    In terms of the priority changeFreq value not working properly, do you have a property added to your site tree with alias:

    searchEngineChangeFrequency

    ?

    If you have a typo in this alias then it won't pull the value through (it is case sensitive, I think too - so SearchEngineChangeFrequency would not work)

    Also there is a bug in early versions of V8 that do not successfully read the value recursively for a dropdown property - I think this was fixed in 8.6 so if you are below that version - that might also be the problem!

    regards

    Marc

  • Peter 8 posts 88 karma points
    Sep 23, 2020 @ 08:52
    Peter
    0

    Hi Marc Goodson,

    Thanks a lot for your solutions, now It works well.

    1. Flagged for the priority: I changed the code is based on your guides

    priority = priority.Replace(",",".");
    

    2. Terms of the priority changeFreq:

    I have been using Umbraco version 8.6.3 and I have added a property to site tree with alias: "searchEngineChangeFrequency" already and now I find out the problem when changeFreq is Empty or Null and I added the below code and it ok now.

    if(String.IsNullOrEmpty(changeFreq)){changeFreq="weekly";}
    
  • Marc Goodson 2155 posts 14408 karma points MVP 9x c-trib
    Sep 23, 2020 @ 15:17
    Marc Goodson
    0

    Great Peter!

    Yes, it is fixed in 8.7 the problem with the dropdown:

    https://github.com/umbraco/Umbraco-CMS/pull/8154

    regards

    Marc

Please Sign in or register to post replies

Write your reply to:

Draft