Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-42607

Forum rss feed displays debugging messages

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.3, 2.6, 2.7
    • Fix Version/s: 2.5.4, 2.6.1
    • Component/s: Forum, RSS
    • Labels:
    • Testing Instructions:
      Hide

      Note that Chrome/Chromium does not support RSS feeds. Firefox does.

      RSS must be enabled on the server.
      Edit rss/file.php and change define("NO_DEBUG_DISPLAY", true) to define("NO_DEBUG_DISPLAY", false) to turn on error reporting.

      Create a forum, post in it and check that the RSS feed works. Try it with the forum RSS feed set to both discussions and posts.

      Note that RSS feeds are cached. When you change the forum settings after viewing the RSS feed and try to view it again you may need to delete the contents of /cache/rss/mod_forum AND clear your browser cache.

      Show
      Note that Chrome/Chromium does not support RSS feeds. Firefox does. RSS must be enabled on the server. Edit rss/file.php and change define("NO_DEBUG_DISPLAY", true) to define("NO_DEBUG_DISPLAY", false) to turn on error reporting. Create a forum, post in it and check that the RSS feed works. Try it with the forum RSS feed set to both discussions and posts. Note that RSS feeds are cached. When you change the forum settings after viewing the RSS feed and try to view it again you may need to delete the contents of /cache/rss/mod_forum AND clear your browser cache.
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull Master Branch:
      MDL-42607_rss

      Description

      When define("NO_DEBUG_DISPLAY", false) is set you get debugging messages relating to "missing full post" and "missing full discussion".

      Replication steps:

      • RSS must be enabled on the server.
      • Edit rss/file.php and change define("NO_DEBUG_DISPLAY", true) to define("NO_DEBUG_DISPLAY", false)
      1. Create a forum activity with the following settings:
        • RSS feed for this activity: posts
          #*Number of RSS recent articles: 10
      2. Add two posts to the forum activity
      3. View the RSS feed.

      You should see a message like the following:

      missing full discussion
       
          line 5412 of /mod/forum/lib.php: call to debugging()
          line 323 of /mod/forum/rsslib.php: call to forum_user_can_see_post()
          line 81 of /mod/forum/rsslib.php: call to forum_rss_feed_contents()
          line 162 of /rss/file.php: call to forum_rss_get_feed()
       
      missing full post
       
          line 5418 of /mod/forum/lib.php: call to debugging()
          line 323 of /mod/forum/rsslib.php: call to forum_user_can_see_post()
          line 81 of /mod/forum/rsslib.php: call to forum_rss_feed_contents()
          line 162 of /rss/file.php: call to forum_rss_get_feed()
      

      See mod/forum/rsslib.php line 318 and 323.
      The call to forum_user_can_see_post() is being sent the postid or the discussionid, when it requires a full post or discussion object.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              andyjdavis Andrew Davis added a comment -

              Requesting peer review.

              This is an interesting issue actually. RSS feeds are heavily cached however the first time the forum feed was requested we were inadvertently going to the database once per post or discussion

              Show
              andyjdavis Andrew Davis added a comment - Requesting peer review. This is an interesting issue actually. RSS feeds are heavily cached however the first time the forum feed was requested we were inadvertently going to the database once per post or discussion
              Hide
              dobedobedoh Andrew Nicols added a comment -

              This looks good to me. Submitting for integration.
              Just one note for testers, you can use wget or curl to retrieve the feed rather than a browser which may make your life simpler if you like that kind of thing.

              Show
              dobedobedoh Andrew Nicols added a comment - This looks good to me. Submitting for integration. Just one note for testers, you can use wget or curl to retrieve the feed rather than a browser which may make your life simpler if you like that kind of thing.
              Hide
              dobedobedoh Andrew Nicols added a comment -

              Actually, just wondering whether this should have commits for stable branches too. I can't pull this back out of integration, but perhaps you could comment Andrew Davis.

              Cheers,

              Andrew

              Show
              dobedobedoh Andrew Nicols added a comment - Actually, just wondering whether this should have commits for stable branches too. I can't pull this back out of integration, but perhaps you could comment Andrew Davis . Cheers, Andrew
              Hide
              andyjdavis Andrew Davis added a comment -

              Backporting. I don't usually backport until after peer review to minimize the number of branches that need updating if/when changes have to be made.

              Show
              andyjdavis Andrew Davis added a comment - Backporting. I don't usually backport until after peer review to minimize the number of branches that need updating if/when changes have to be made.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Integrated (25, 25 and 27), thanks!

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Integrated (25, 25 and 27), thanks!
              Hide
              skodak Petr Skoda added a comment -

              works for me, thanks

              Show
              skodak Petr Skoda added a comment - works for me, thanks
              Hide
              damyon Damyon Wiese added a comment -

              David built a framework for behat
              At first just to test this and that
              10000+ steps written
              Sounds like we're all smitten
              And David should be smiling at that

              Thanks for reporting, patching, and testing this issue. It has been released upstream along with 64 others today.

              Show
              damyon Damyon Wiese added a comment - David built a framework for behat At first just to test this and that 10000+ steps written Sounds like we're all smitten And David should be smiling at that Thanks for reporting, patching, and testing this issue. It has been released upstream along with 64 others today.

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    13/Jan/14