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

    I had set up my rss feed following the guide here http://rtfm.modx.com/display/ADDON/getResources.Building+a+RSS+feed and it was working yesterday but today I just get a blank screen when viewing the page and a Page Not found for the feed link.

    Any ideas?

    Chunk

    <item>
    <title>[[+pagetitle:htmlent]]</title>
    <link>[[++site_url]][[~[[+id]]]]</link>
    <description>[[+tv.blog-summary]]</description>
    <pubDate>[[+publishedon:strtotime:date=`%a, %d %b %Y %R:%S %Z`]]</pubDate>
    <guid>http://www.makethemclick.com.au/?id=[[+id]]</guid>
    </item>


    Page
    <?xml version="1.0" encoding="UTF-8"?>
    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>[[*pagetitle]]</title>
        
    <link>[[~[[*id]]? &scheme=`full`]]</link>
        <description>[[*tv.blog-summary:cdata]]</description>
        <language>[[++cultureKey]]</language>
        <ttl>120</ttl>
        <atom:link href="[[~[[*id]]? &scheme=`full`]]" rel="self" type="application/rss+xml" />
    [[getResources?
      &tpl=`rssItem`
      &parents=`3`
      &depth=`3`
      &limit=`10`
      &includeContent=`1`
      &includeTVs=`1`
      &showHidden=`1`
      &hideContainers=`1`
    ]]
    </channel>
    </rss>


    Thanks [ed. note: markg last edited this post 11 years, 2 months ago.]
      Content Creator and Copywriter
      • 36572
      • 20 Posts
      Hi

      what kind of response did you get?

      a 404 or a 500.

      Mostly if you get a blank screen there is an error in the php part.

      Did you try this in the address-bar chrome or firefox?
      view-source:http://the-url-you-want-to-see.com/my-page/i-want-to-view
      If this is also blank there is definitely an error in the php part of the site.
        Developer @ Sterc bureau voor internet & marketing
        • 18367
        • 834 Posts
        Frisco,

        ok weird things are happening.

        I'm using Firefox.

        On Sunday the feed worked, on Monday I got a blank page, and today it is trying to download the feed.

        Three different results in three days huh

        Anyway I tried the link in Chrome and I at least got the xml version of the feed.

        If I try it in MSIE I get yet another error message
        Reference to undefined entity 'rsquo'.
        Line: 29 Character: 279

        ugh

        Also interesting is my legacy feedburner account is picking up the feed ok but Google Reader can't find it.

        Beats me as to what the hell's going on. [ed. note: markg last edited this post 11 years, 2 months ago.]
          Content Creator and Copywriter
          • 18367
          • 834 Posts
          Ok,

          FF is no longer trying to download the file and is back to a blank page. When i look at the source code there is nothing there.

          Chrome shows the xml structure with the correct content and MSIE shows this error message, which basically means it doesn't like apostrophes in the content.

          Reference to undefined entity 'rsquo'.
          Line: 37 Character: 279

          The key part being members&rsquo



          And feedburner still works.

          ??? [ed. note: markg last edited this post 11 years, 2 months ago.]
            Content Creator and Copywriter
            • 36572
            • 20 Posts
            Ah. there is a problem with your html entities.
            Also try a html entities on your tv.blog-summary. and cdata the the description smiley
            <item>
            <title>[[+pagetitle:htmlent]]</title>
            <link>[[++site_url]][[~[[+id]]]]</link>
            <description><![CDATA[ [[+tv.blog-summary:htmlent]] ]]</description>
            <pubDate>[[+publishedon:strtotime:date=`%a, %d %b %Y %R:%S %Z`]]</pubDate>
            <guid>http://www.makethemclick.com.au/?id=[[+id]]</guid>
            </item>
            


            Also use includeTV'sList makes it a bit faster
            [[getResources?
              &tpl=`rssItem`
              &parents=`3`
              &depth=`3`
              &limit=`10`
              &includeContent=`1`
              &includeTVs=`1`
            &includeTVList=`blog-summary`
              &showHidden=`1`
              &hideContainers=`1`
            ]]
            


            You replied when is was typing.

            For the ' problem make an output filter that escapes them.
              Developer @ Sterc bureau voor internet & marketing
              • 18367
              • 834 Posts
              AHA

              bl@#dy apostrophes. After all that!

              I limited the posts to just one, thereby excluding the one with correct grammar, and hey presto the feed is working again.

              However, it's not really an acceptable solution as correct grammar is obviously a necessity.

              Does anybody know why punctuation in the content would be causing this problem?

              Is there a System setting that could be putting it off?

              PS Frisco, you must have been typing the same time as me. I'll checkout your suggestions and get back to you. I had noticed my original code had got mangled somehow, maybe with a rich text editor. (It's set to off but the damage may have already been done.)

                Content Creator and Copywriter
                • 18367
                • 834 Posts
                Hmmm,

                at some stage I went back to the original tute instructions and re did the code.

                What I now have is this:

                <?xml version="1.0" encoding="UTF-8"?>
                <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
                <channel>
                  <title>[[*pagetitle:htmlent]]</title>
                    <link>[[~[[*id]]? &scheme=`full`]]</link>
                
                    <description>[[*tv.blog-summary:cdata]]</description>
                    <language>[[++cultureKey]]</language>
                    <ttl>120</ttl>
                    <atom:link href="[[~[[*id]]? &scheme=`full`]]" rel="self" type="application/rss+xml" />
                [[getResources?
                  &tpl=`rssItem`
                  &parents=`3`
                  &depth=`2`
                  &limit=`1`
                  &includeContent=`1`
                  &includeTVs=`1`
                  &includeTVList=`blog-summary`
                  &showHidden=`0`
                  &hideContainers=`1`
                ]]
                </channel>
                </rss>


                It works apart from not accepting any apostrophes in the blog summary content.

                I'll have to have another look at it in the morning.

                Thanks so far.
                  Content Creator and Copywriter
                  • 18367
                  • 834 Posts
                  ok,

                  after endlessly adjusting and redoing the code I have almost got it functioning. There is still an issue related to it not liking things like apostrophes and dashes in the content title, but otherwise it's working.

                  That is, it pulls the content and displays it ok, unless there's a dash or apostrophe in the title.

                  Not sure why that would be but if anybody can explain it, thanks.

                  Here's what the code looks like now.

                  The feed page and call:

                  <?xml version="1.0" encoding="UTF-8"?>
                  <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
                  <channel>
                    <title>[[*pagetitle]]</title>
                      <link>[[~[[*id]]? &scheme=`full`]]</link>
                      <description>[[*tv.blog-summary:cdata]]</description>
                      <language>[[++cultureKey]]</language>
                      <ttl>120</ttl>
                      <atom:link href="[[~[[*id]]? &scheme=`full`]]" rel="self" type="application/rss+xml" />
                  [[getResources?
                    &tpl=`rssItem`
                    &parents=`3`
                    &depth=`2`
                    &limit=`4`
                    &includeContent=`1`
                    &includeTVs=`1`
                    &showHidden=`0`
                    &hideContainers=`1`
                  ]]
                  </channel>
                  </rss>


                  The chunk
                  <item>
                  <title>[[+pagetitle:htmlent]]</title>
                  <link>[[++site_url]][[~[[+id]]]]</link>
                  <link>[[~[[+id]]? &scheme=`full`]]</link>
                  <description>[[+tv.blog-summary:cdata]]</description>
                  <pubDate>[[+publishedon:strtotime:date=`%a, %d %b %Y %R:%S %Z`]]</pubDate>
                  <guid>http://www.makethemclick.com.au/?id=[[+id]]</guid>
                  </item>


                  I tried the chunk Frisco's chunk but it just came out blank.

                  So a little progress at least.

                    Content Creator and Copywriter
                    • 37984
                    • 215 Posts
                    I know it's a little late in the game to try and switch, but is there any reason you don't just use the Articles addon? It comes pre-packaged with a nearly flawless (and endlessly customizable) working RSS feed. I'm currently using it on half a dozen sites with NO issues whatsoever. I can see by your placeholders that you're using Revolution, so it should be a quick thing to install and import your existing Resources into Articles.

                    If that isn't for you, you may try calling getResources uncached, and including the &processTVs parameter.

                    [[!getResources?
                      &tpl=`rssItem`
                      &parents=`3`
                      &depth=`2`
                      &limit=`4`
                      &includeContent=`1`
                      &includeTVs=`1`
                      &processTVs=`1`
                      &showHidden=`0`
                      &hideContainers=`1`
                    ]]
                    


                    vs.

                    [[getResources?
                      &tpl=`rssItem`
                      &parents=`3`
                      &depth=`2`
                      &limit=`4`
                      &includeContent=`1`
                      &includeTVs=`1`
                      &showHidden=`0`
                      &hideContainers=`1`
                    ]]
                    
                    [ed. note: designcouch last edited this post 11 years, 2 months ago.]
                      Jesse Couch
                      MODX Aficionado, Front-End Designer & Developer
                      http://www.designcouch.com
                      • 18367
                      • 834 Posts
                      Jesse,

                      short answer: Articles doesn't do categories.

                      Long answer: I'm recreating an existing Evo blog on Revo, and after looking at many other posts and experimenting with Articles it was just easier and quicker to do it this way.

                      If I was starting from scratch I would have probably gone with Articles.
                        Content Creator and Copywriter