We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2685
    • 44 Posts
    I was trying to create RSS feed for my site.

    http://wiki.modxcms.com/index.php/Basic_RSS_feed

    Viewed this wiki... but it ain’t working.

    After following all those steps as shown in the above link, I put the link to the xml doc as follows -

    http://localhost/website-modx/index?id=73 =>blog template


    [(site_name)] Feed

    [[Ditto? &parents=`0` &format=`rss` &commentschunk=`Comments` &tpl=`rss_item`]]


    rss_item Chunk

    <item>
    <title>[+rss_pagetitle+]</title>
    <link>[(site_url)][~[+id+]~]</link>
    <description><![CDATA[ [+introtext+] ]]></description>
    <pubDate>[+rss_date+]</pubDate>
    <guid isPermaLink="false">[(site_url)][~[+id+]~]</guid>
    </item>


    <link rel="alternate" type="application/rss+xml" title="[(site_name)] RSS feed" href="[~73~]"/> =>template

    73 is the doc id of xml file

      • 5915
      • 21 Posts
      It’s doing the same thing for me. I set it up and it takes me to the error page. I have no clue what to do...ah I can get it to work with freindly urls off....but nothing with it on. It says "The document name you requested (/index.php) could not be found on this server." Um really. Sure.

      Make sure when you created the page "[(site_name)] Feed" that the template is set to blank.
        • 2685
        • 44 Posts
        I’m a newbie

        Well RSS link ain’t working.


        <link rel="alternate" type="application/rss+xml" title="[(site_name)] RSS feed" href="[~73~]"/>

        <link rel="alternate" type="application/rss+xml" title="[(site_name)] RSS feed" href="RSS Feed">

        I tried both of these in template but none of them worked.
        I even set the required attributes of the RSS feed doc.


        When one click on RSS feed pic on the address bar it shows with


        Not Found

        The requested URL /website-modx/index was not found on this server.


        In addition how to put the subscribe inside the page???
          • 5915
          • 21 Posts
          I’m going to seek alternative methods to ditto. I can get it to work, but it fails to register without error in feedburner, I believe do to a resource path issue because I’m trying to run this on a subdomain. I’ll keep you posted.
            • 2685
            • 44 Posts
            So did you came across any gud snippets?
              • 9130
              • 171 Posts
              I’ve used the wiki method with no problems, just a plain snippet call no chunks or anything, it also works fine with feedburner. I have friendly urls enabled and use the friendly name in feedburner. 

              Can you access the xml page directly? does it show up correctly?
              Obviously you cannot subscribe or use using an external service to view a feed thats only available on your local computer.
                • 5915
                • 21 Posts
                The wiki method does work somewhat, though I haven’t made it work with the chunk. As baibhav mentioned it registers as a real feed with the snippet call alone. There seems to be a problem with the way the chunk is working, formatting the rss, etc. I’m not sure. But, here is some useful info that might help you getting it to work.

                A. Make your xml page published by clicking the checkmark when editing your xml page. You will be able to go to that page and see if your feed is actually working and displaying the feed of info from all of your MODX site web pages.

                B. When you call the snippet, you have to call an "uncached" snippet. This means you have to use brackets and exclamation points instead of the double brackets they show in their wiki tutorial.

                Use This:
                [!Ditto? &parents=`0` &format=`rss` &summarize=`20` &total=`20`!]

                NOT this:
                [[Ditto? &parents=`0` &format=`rss` &summarize=`20` &total=`20`]]
                  • 2685
                  • 44 Posts
                  Actually it don’t show up.
                  When I clicked the RSS feed icon on the side of address bar, it takes me to the error page.

                  Yah I did try it in the online page.

                  What could be the problem???
                    • 9130
                    • 171 Posts
                    I’m not sure where the feed icon is supposed to take you. Try entering the feed address directly in the address bar and see if you get the correct xml.

                    I registered the feed with feedburner (or whatever google calls it these days) and I’m the address they gave me. I don’t use the feed address directly. I’d rather have them handle the more complicated parts of the protocol.
                      • 2685
                      • 44 Posts
                      « MODx Parse Error »
                      MODx encountered the following error while attempting to parse the requested resource:
                      « PHP Parse Error »
                       
                      PHP error debug
                        Error: 	html_entity_decode() expects parameter 1 to be string, array given	 
                        Error type/ Nr.: 	Warning - 2	 
                        File: 	/home/webapps/deerwalk/releases/v4/assets/snippets/ditto/formats/rss.format.inc.php	 
                        Line: 	96	 
                        Line 96 source: 	return htmlspecialchars(html_entity_decode($resource['pagetitle'], ENT_QUOTES)); 	 
                       
                      Parser timing
                        MySQL: 	0.0037 s	(8 Requests)
                        PHP: 	0.0435 s	 
                        Total: 	0.0472 s
                      
                      


                      I’ve this error error when I try to open the Rss feed.xml file online directly.