Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.2
    • Component/s: Blog, RSS
    • Labels:
    • Environment:
      qa.moodle.net
    • Testing Instructions:
      Hide

      From QA test:
      1. Log in as a student and browse to a blog.
      2. Check that an orange RSS button is displayed on the page and that it links to the RSS feed for the blog.
      3. Browse to a database activity and check that an orange RSS button is displayed in the settings block and that it links to the RSS feed for the activity.
      4. Browse to a forum and check that an orange RSS button is displayed in the settings block and that it links to the RSS feed for the activity.
      5. Browse to a glossary and check that an orange RSS button is displayed in the settings block and that it links to the RSS feed for the activity.
      6. Log out then log in as a guest and repeat all the above steps.

      Show
      From QA test: 1. Log in as a student and browse to a blog. 2. Check that an orange RSS button is displayed on the page and that it links to the RSS feed for the blog. 3. Browse to a database activity and check that an orange RSS button is displayed in the settings block and that it links to the RSS feed for the activity. 4. Browse to a forum and check that an orange RSS button is displayed in the settings block and that it links to the RSS feed for the activity. 5. Browse to a glossary and check that an orange RSS button is displayed in the settings block and that it links to the RSS feed for the activity. 6. Log out then log in as a guest and repeat all the above steps.
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-30386-master
    • Rank:
      33006

      Description

      When displaying a blog, no RSS feed icon is visible, logged as a student or a teacher.

        Issue Links

          Activity

          Hide
          Nicolas Martignoni added a comment -

          Clone of MDL-30376 per Eloy's request.

          Show
          Nicolas Martignoni added a comment - Clone of MDL-30376 per Eloy's request.
          Hide
          Michael de Raadt added a comment -

          There is a moodle/blog:view capability that should be checked when showing the feed link and delivering the feed content.

          Show
          Michael de Raadt added a comment - There is a moodle/blog:view capability that should be checked when showing the feed link and delivering the feed content.
          Hide
          Sam Hemelryk added a comment -

          Hi Jason,

          Good effort so far, the premis is spot on however a couple of things to touch up before this goes up for integration.
          One bug (regression) and two coding style things.

          The following are the notes that I have made:

          1. The commit message should start with just the MDL issue number not the whole branch name e.g. "MDL-30386 blog - Adding RSS Feed link to the User blogs"
          2. Before displaying the RSS feed link you first need to check that RSS feeds have been enabled for the site. $CFG->enablerssfeeds. This should be checked within blog_get_options_for_user.
          3. Also within blog_get_options_for_user you need to check your whitespace for the array key=>value pairs. Check out what is done a couple lines above.

          Yell out if you are unsure about anything.

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Hi Jason, Good effort so far, the premis is spot on however a couple of things to touch up before this goes up for integration. One bug (regression) and two coding style things. The following are the notes that I have made: The commit message should start with just the MDL issue number not the whole branch name e.g. " MDL-30386 blog - Adding RSS Feed link to the User blogs" Before displaying the RSS feed link you first need to check that RSS feeds have been enabled for the site. $CFG->enablerssfeeds. This should be checked within blog_get_options_for_user. Also within blog_get_options_for_user you need to check your whitespace for the array key=>value pairs. Check out what is done a couple lines above. Yell out if you are unsure about anything. Cheers Sam
          Hide
          Aparup Banerjee added a comment -

          just noting that theres a error_log(print_r($CFG,true)); in the patch.

          Show
          Aparup Banerjee added a comment - just noting that theres a error_log(print_r($CFG,true)); in the patch.
          Hide
          Jason Fowler added a comment -

          All fixed now

          Show
          Jason Fowler added a comment - All fixed now
          Hide
          Aparup Banerjee added a comment -

          Hi Jason,
          some review notes:

          Please check properly for functions calls that aren't needed, in this case $canview already held the capability needed (moodle/blog:view).

          I've fixed that now as we are near to release.

          otherwise good work , its been integrated and is up for testing.

          ps: do we need to back port this fix? it seems likely but just checking. if needed please open an issue for back porting this.

          Show
          Aparup Banerjee added a comment - Hi Jason, some review notes: Please check properly for functions calls that aren't needed, in this case $canview already held the capability needed (moodle/blog:view). I've fixed that now as we are near to release. otherwise good work , its been integrated and is up for testing. ps: do we need to back port this fix? it seems likely but just checking. if needed please open an issue for back porting this.
          Hide
          Michael de Raadt added a comment - - edited

          I ran into some errors while testing this.

          A php error:

          Notice: Trying to get property of non-object in D:\xampp\htdocs\moodle_testing\blog\rsslib.php on line 60
          

          A Moodle exception stack trace:

          Can not change context instance properties!
          
              line 4642 of \lib\accesslib.php: call to debugging()
              line 317 of \blog\lib.php: call to context->__set()
              line 698 of \blog\lib.php: call to blog_get_context_url()
              line 824 of \blog\locallib.php: call to blog_get_headers()
              line 234 of \blog\index.php: call to blog_listing->print_entries()
          

          I couldn't see that any of these lines were related to the recent changes.

          The page did generate an RSS link that my browser could detect. On my test server, the RSS feed link and icon were visible, but I couldn't see this on qa.moodle.net (but that may have been a matter of timing).

          Show
          Michael de Raadt added a comment - - edited I ran into some errors while testing this. A php error: Notice: Trying to get property of non-object in D:\xampp\htdocs\moodle_testing\blog\rsslib.php on line 60 A Moodle exception stack trace: Can not change context instance properties! line 4642 of \lib\accesslib.php: call to debugging() line 317 of \blog\lib.php: call to context->__set() line 698 of \blog\lib.php: call to blog_get_context_url() line 824 of \blog\locallib.php: call to blog_get_headers() line 234 of \blog\index.php: call to blog_listing->print_entries() I couldn't see that any of these lines were related to the recent changes. The page did generate an RSS link that my browser could detect. On my test server, the RSS feed link and icon were visible, but I couldn't see this on qa.moodle.net (but that may have been a matter of timing).
          Hide
          Michael de Raadt added a comment -

          Notable, the error above occurred when I clicked on a single blog entry.

          Also, I checked an older version and the second error (the stack trace) was there already. I'll log an error for that separately.

          However, the rsslib error is new.

          Show
          Michael de Raadt added a comment - Notable, the error above occurred when I clicked on a single blog entry. Also, I checked an older version and the second error (the stack trace) was there already. I'll log an error for that separately. However, the rsslib error is new.
          Hide
          Aparup Banerjee added a comment -

          Hi Michael,
          these are pre-existing issues. we need to create new issue(s) for those.

          Resetting the test to test while disregarding the above non-related error.

          Show
          Aparup Banerjee added a comment - Hi Michael, these are pre-existing issues. we need to create new issue(s) for those. Resetting the test to test while disregarding the above non-related error.
          Hide
          Aparup Banerjee added a comment -

          now ready for testing.

          ps: the new issues discover seem to affect 2.1 as well (overheard Michael)

          Show
          Aparup Banerjee added a comment - now ready for testing. ps: the new issues discover seem to affect 2.1 as well (overheard Michael)
          Hide
          Michael de Raadt added a comment -

          I've launched and linked two issues, one for each of the errors above.

          Show
          Michael de Raadt added a comment - I've launched and linked two issues, one for each of the errors above.
          Hide
          Michael de Raadt added a comment -

          Starting testing again. I want to ensure this is OK on qa.moodle.net.

          Show
          Michael de Raadt added a comment - Starting testing again. I want to ensure this is OK on qa.moodle.net.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Sent upstream! Just in time for Moodle 2.2rc1 (if related), yay!

          Closing and big thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Sent upstream! Just in time for Moodle 2.2rc1 (if related), yay! Closing and big thanks!

            People

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

              Dates

              • Created:
                Updated:
                Resolved: