We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28465
    • 29 Posts
    Hi,

    I’d like to offer an ATOM newsfeed on my site and accomplished that by changing the format in Ditto’s call from "rss" to "atom". I can get a validating ATOM feed by using the alias "atom.xml", but there’s some warnings from feedvalidator.org I’d like to get rid of:

    Warning

    This feed is valid, but may cause problems for some users. We recommend fixing these problems.

    *

    line 7, column 79: "self" link references a non-Atom representation: text/xml [help]

    <link rel="self" type="text/xml" href="http://domain.tld/atom.xml.html" />
    ^

    *

    line 7, column 79: Self reference doesn’t match document location [help]

    <link rel="self" type="text/xml" href="http://domain.tld/atom.xml.html" />

    It seems MODx is appending ".html" to the alias name (as is cool with usual pages), how can I prevent that from happening in this case? I’m aware that this doesn’t necessarily have to be a Ditto matter, but I wasn’t sure, as the matter crept up in a Ditto context.
      • 18397
      • 3,250 Posts
      Unfortunately there is nothing you can do short of hardcoding the URL in the template. This is a shortcoming of the parser that has been discussed many times. The alternative I’ve been considering is making that a permalink ala index.php?id=[+id+]. Any thoughts?
        • 28465
        • 29 Posts
        Hardcoding "[(site_url)]atom.xml" into the template instead of something like "[(site_url)][~11~]" unfortunately doesn’t make much of a difference (both approaches basically work which is cool), because both references point to the same page which in turn will be resolved to "atom.xml.html" or "11.html".

        I guess it needs testing whether "index.php?id=[+id+]" would result in a "self" link references a non-Atom representation: text/xml> warning as well. What would the final resource for the feed be that id=[+id+] would point to? If it ultimately pointed to page, say, 11.html, we’d be back at square one.

        I’m not sure in which scenarios the validator warnings might come to bear anyway, I could subscribe to my feed with either file names. Maybe this situation is just a matter of keeping it in mind and addressing it if/when the parser is discussed again?