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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 3.9.3, 3.10, 3.11, 4.0
    • JavaScript
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE

      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 dobedobedoh:
        "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.

            Unassigned Unassigned
            Geshoski Mihail Geshoski
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

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

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