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

Throwing error in modal triggers two notifications of the same error and creates backdrop issues

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.9.3, 3.10, 3.11, 4.0
    • Fix Version/s: None
    • Component/s: JavaScript
    • Labels:
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE

      Description

      There seems to be several issues when an error is being thrown in the modal.

      1. When an error occurs while setting up the modal's body the same error notification is displayed twice. From a discussion with Andrew Lyons:
        "One of the issues is that setBody() has its own promise chaining. It uses .then().then().fail(Notification.exception).always().fail(Notification.exception)}}The problem with jQuery's {{.fail() is that it returns a rejected Promise which means you get two notifications with the same error"
      2. The modal backdrop is not being cleared once the displayed error notifications and the existing modals are closed. This blocks users to take any actions on the page and are forced to refresh the page.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Geshoski Mihail Geshoski
              Reporter:
              Geshoski Mihail Geshoski
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 minute
                  1m