Copied to clipboard

Flag this post as spam?

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


  • Jeroen Oostwouder 100 posts 296 karma points
    Oct 16, 2015 @ 14:35
    Jeroen Oostwouder
    0

    XML Sitemap title not allowed?

    Hi all,

    I'm having some trouble implementing a XML-sitemap.

    I have a regular sitemap in my content-tree. When I place a xml-sitemap node underneath it (with it's own template and documenttype), strange things happen.

    If I give it the name "XML Sitemap" and navigate to the URL of the page, I end up on the regular sitemap. Even when I clear my complete XML-sitemap template, I see the regular sitemap.

    But when I give it another name (e.g. "Google Sitemap", or just "Jeroen"), it works. I see the empty template.

    Is an "XML Sitemap" node not allowed under a "Sitemap" node?

  • Chriztian Steinmeier 2798 posts 8787 karma points MVP 7x admin c-trib
    Oct 16, 2015 @ 15:50
    Chriztian Steinmeier
    0

    Hi cryothic,

    It sounds a lot like an alternate template is taking precedence somehow - so if the URL looks like this: /about/sitemap/xml-sitemap - /sitemap/ is the umbraco node and xml-sitemap is the alias of the template being used. This can also be activated with a QueryString param, i.e.: /about/sitemap?alttemplate=xml-sitemap.

    Based on the other things you tried, it doesn't quite sound like this is the problem, though it's most likely part of it...

    If an XML Sitemap node wasn't allowed under a Sitemap node, you wouldn't be able to create it in the first place - and nothing in code should be doing something to prevent such a naming clash either.

    Could you try and see if you are able to get the "XML Sitemap" page to show something else by specifying an alternate template, specifically (e.g. using the Home template if you have one with that alias) - like this:

    /path/to/sitemap/xml-sitemap?alttemplate=home
    

    /Chriztian

  • Jeroen Oostwouder 100 posts 296 karma points
    Oct 16, 2015 @ 19:21
    Jeroen Oostwouder
    0

    Thanks for the reply. I will try it monday when I'm back at the office ;)

    I noticed I wasn't even allowed to enter "XML" as the name of the node. I got an error telling me there was a problem.

  • Chriztian Steinmeier 2798 posts 8787 karma points MVP 7x admin c-trib
    Oct 16, 2015 @ 21:40
    Chriztian Steinmeier
    0

    Regarding using "XML" as the name of a node; I haven't seen errors about that before, though it makes great sense, as long as cache is still an XML document - the node name is used to create the node's alias, which in turn is used to create an XML element in the cache - an element is not allowed to start with "XML" (case-insensitive) because those are considered reserved for future language features, should they ever come (most likely won't).

    But, alas, I've not seen an XML parser complain about that either, so actually surprised to see that you got that error...

    /Chriztian

  • Jeroen Oostwouder 100 posts 296 karma points
    Oct 17, 2015 @ 11:51
    Jeroen Oostwouder
    0

    Maybe it filters "XML" from the pagetitle somehow?

    It would explain why "XML Sitemap" ends up on "Sitemap", and why just "XML" gives an error.

    "Sitemap XML" works as expected.

Please Sign in or register to post replies

Write your reply to:

Draft