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

Invalid parameter type error in core_message_get_messages due to missing cleaning

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.1.6, 4.2.3
    • 4.1.5, 4.2.2
    • Messages
    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-79557-401
    • MDL-79557-master
    • Hide
      Prerequisite
      1. Moodle mobile app.
      2. Your Moodle mobile app should be able to connect to your Moodle website. You can either do the following:
        • Ensure that the phone with the mobile app and the web server are on the same network. Or
        • Expose the web server over the internet via ngrok.
      Test
      1. As an admin, enable “Web services for mobile devices” on Site administration ► Advanced features
      2. Enable the MathJax filter and ensure applies to "Content and headings" via Site administration -> Plugins -> Manage filters
      3. Create a new course using as full and short name "Course $$a$$"
      4. Enrol one user as student to the course
      5. As admin or teacher create a new Page resource within the previous course, ensure that the option "Send content change notification" is selected before saving the changes
      6. Using the mobile app, log in to the site as the student user from the previous steps and open the Notifications page (by clicking the bell icon at the bottom of the app)
      7. Confirm that:
        • You can see the notification about new content in the course and you don't see any exception/error in the page
      Show
      Prerequisite Moodle mobile app. Your Moodle mobile app should be able to connect to your Moodle website. You can either do the following: Ensure that the phone with the mobile app and the web server are on the same network. Or Expose the web server over the internet via ngrok. Test As an admin, enable “Web services for mobile devices” on Site administration ► Advanced features Enable the MathJax filter and ensure applies to "Content and headings" via Site administration -> Plugins -> Manage filters Create a new course using as full and short name "Course $$a$$" Enrol one user as student to the course As admin or teacher create a new Page resource within the previous course, ensure that the option "Send content change notification" is selected before saving the changes Using the mobile app, log in to the site as the student user from the previous steps and open the Notifications page (by clicking the bell icon at the bottom of the app) Confirm that: You can see the notification about new content in the course and you don't see any exception/error in the page

      This bug has been around for some time but we did not notice it until this fix was integrated MDL-77833 and we were doing some testing using MathJax in the Course name

      For what I've seen in other parts of Moodle core we need to clean the content of the message->subject field (after format_string), see blog/lib.php and nessage/output/popup/classes/output/popup_notification.php (subject = clean_param(...))

      To reproduce:

      • Enable the MathJax filter and ensure applies to "Content and headings" Via Site administration -> Plugins -> Manage filters
      • Create a new course using as full and short name "Course $$a$$"
      • Enrol one user as student to the course
      • As admin or teacher create a new Page resource within the previous course, ensure that the option "Send content change notification" is selected before saving the changes
      • Using the mobile app, log in as the student user and go to the Notifications option (the bell icon at the bottom of the app)
      • You will see an exception

            jleyva Juan Leyva
            jleyva Juan Leyva
            Dani Palou Dani Palou
            Jun Pataleta Jun Pataleta
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 11 minutes
                2h 11m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.