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

Unnecessary AJAX request core_fetch_notifications on all pages

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE
    • MDL-62678-core-fetch-notifications
    • Hide
      1. Create a test page MDL-62678-notify-alert.php. Otherwise, you can download to the site root MDL-62678-notify-alert-on-same-page.php

        <?php
         
        include('config.php');
        $PAGE->set_url('/');
        $PAGE->set_context(context_system::instance());
        $PAGE->set_title('MDL-62678');
         
        require_login();
         
        \core\notification::info('1 before header, stored in session');
        echo $OUTPUT->header();
         
        \core\notification::info('2 before footer, rendered inline');
        echo $OUTPUT->footer();
         
        \core\notification::info('3 after footer, was ajax, now inline');
         
        \core\session\manager::write_close();
        \core\notification::info('4 was ignored, now inline');
        

      2. Confirm you see this:
      3. Download and run MDL-62678-notify-then-redirect.php
      4. Confirm that you get a redirection notification on the next page.
      5. Download and run MDL-62678-notify-while-redirecting.php
      6. Confirm that you get a redirection notification on the next page.

      NOTE: In steps 3 and 5, depending on your configuration, it may be required to remove the leading slash from the “/my/" path in the redirect() function. 

      Show
      Create a test page  MDL-62678 -notify-alert.php. Otherwise, you can download to the site root  MDL-62678-notify-alert-on-same-page.php <?php   include ( 'config.php' ); $PAGE ->set_url( '/' ); $PAGE ->set_context(context_system::instance()); $PAGE ->set_title( 'MDL-62678' );   require_login();   \core\notification::info( '1 before header, stored in session' ); echo $OUTPUT ->header();   \core\notification::info( '2 before footer, rendered inline' ); echo $OUTPUT ->footer();   \core\notification::info( '3 after footer, was ajax, now inline' );   \core\session\manager::write_close(); \core\notification::info( '4 was ignored, now inline' ); Confirm you see this: Download and run  MDL-62678-notify-then-redirect.php Confirm  that you get a redirection notification on the next page. Download and run  MDL-62678-notify-while-redirecting.php Confirm  that you get a redirection notification on the next page. NOTE : In steps 3 and 5, depending on your configuration, it may be required to remove the leading slash from the “/my/" path in the redirect()  function. 

      Unnecessary AJAX request core_fetch_notifications on all pages

            brendanheywood Brendan Heywood
            cescobedo Carlos Escobedo
            Matt Porritt Matt Porritt
            Victor Déniz Falcón Victor Déniz Falcón
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            3 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours, 15 minutes
                5h 15m

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