Moodle
  1. Moodle
  2. MDL-42579

Missing alternate name fields when creating RSS for Glossary Module

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6
    • Component/s: Glossary, RSS
    • Labels:
    • Testing Instructions:
      Hide

      Prerequisites:

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

      Create a glossary activity with the following settings:
      RSS feed for this activity: Concepts with author
      Number of RSS recent articles: 10
      Add two entries to the Glossary Activity
      View the RSS feed.

      Expected result: No errors are displayed.

      Show
      Prerequisites: RSS must be enabled on the server. Edit rss/file.php and change define("NO_DEBUG_DISPLAY", true) to define("NO_DEBUG_DISPLAY", false) Create a glossary activity with the following settings: RSS feed for this activity: Concepts with author Number of RSS recent articles: 10 Add two entries to the Glossary Activity View the RSS feed. Expected result: No errors are displayed.
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-42579_m26_2

      Description

      Prerequisites:

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

      Expected result: No errors are displayed.

      Actual result: The following is shown.

      XML Parsing Error: junk after document element
      Location: http://localhost/moodle/moodlemaster/rss/file.php/30/62928ca48c37b76007ab72a3965ce3fb/mod_glossary/1/rss.xml
      Line Number 1, Column 397:
       
      <div class="notifytiny debuggingmessage" data-rel="debugging">You need to update your sql to include additional name fields in the user object.<ul style="text-align: left" data-rel="backtrace"><li>line 3568 of \lib\moodlelib.php: call to debugging()</li><li>line 96 of \mod\glossary\rsslib.php: call to fullname()</li><li>line 162 of \rss\file.php: call to glossary_rss_get_feed()</li></ul></div><?xml version="1.0" encoding="UTF-8"?>
      

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Ankit Agarwal added a comment -

            Hi Stephen,
            Thanks for taking this issue on.

            Patch looks great, however I don't think we should be hard coding the field names in glossary_rss_get_feed.
            We can simply pass $rec to fullname() and it should be able to parse name from it, since it now has all required fields.

            Thanks

            Show
            Ankit Agarwal added a comment - Hi Stephen, Thanks for taking this issue on. Patch looks great, however I don't think we should be hard coding the field names in glossary_rss_get_feed. We can simply pass $rec to fullname() and it should be able to parse name from it, since it now has all required fields. Thanks
            Hide
            Stephen Bourget added a comment -

            I've made those changes and re-pushed the code to github.

            Show
            Stephen Bourget added a comment - I've made those changes and re-pushed the code to github.
            Hide
            Michael de Raadt added a comment -

            Thanks for working on this, Stephen.

            Ankit, perhaps you could take another look.

            Show
            Michael de Raadt added a comment - Thanks for working on this, Stephen. Ankit, perhaps you could take another look.
            Hide
            Ankit Agarwal added a comment - - edited

            Thanks Stephen, patch looks perfect now, pushing forward.
            [y] Syntax
            [y] Whitespace
            [-] Output
            [-] Language
            [-] Databases
            [y] Testing , I have copied instructions from description
            [-] Security
            [-] Documentation
            [y] Git
            [-] Third party code
            [y] Sanity check

            Thanks

            Show
            Ankit Agarwal added a comment - - edited Thanks Stephen, patch looks perfect now, pushing forward. [y] Syntax [y] Whitespace [-] Output [-] Language [-] Databases [y] Testing , I have copied instructions from description [-] Security [-] Documentation [y] Git [-] Third party code [y] Sanity check Thanks
            Hide
            Stephen Bourget added a comment -

            Just realized that the posted branch had an error, posted the corrected branch

            Show
            Stephen Bourget added a comment - Just realized that the posted branch had an error, posted the corrected branch
            Hide
            Damyon Wiese added a comment - - edited

            Thanks Stephen. Looks great. I tested this in integration so I'll go ahead and pass the test.

            (Integrated to master only)

            Show
            Damyon Wiese added a comment - - edited Thanks Stephen. Looks great. I tested this in integration so I'll go ahead and pass the test. (Integrated to master only)
            Hide
            Damyon Wiese added a comment -

            Passing!

            Show
            Damyon Wiese added a comment - Passing!
            Hide
            Dan Poltawski added a comment -

            Congratulations - this issue has been included in Moodle and is now available on our git mirrors and shortly will become available on the download servers shortly.

            Show
            Dan Poltawski added a comment - Congratulations - this issue has been included in Moodle and is now available on our git mirrors and shortly will become available on the download servers shortly.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: