Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-3140

Site blocks no longer work in 3.7.1 if they don't specify displaydata

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.8.0
    • 3.7.1
    • Blocks
    • Moodle App 3.8.0

      In 3.7, our site block (as implemented in MOBILE-2935) worked; in 3.7.1, it stopped working.

      I have investigated and the cause is that our 'handlers' in mobile.php was:

                  'linksview' => [
                      'delegate' => 'CoreBlockDelegate',
                      'method' => 'mobile_block_view',
                      'styles' => [
                          'url' => $CFG->wwwroot . '/blocks/ousitelinks/mobile.css?v=2019071600',
                          'version' => 2019071600
                      ]
                  ]
      

      Note that there is no 'displaydata' array. Adding this makes the block work again:

                      'displaydata' => [
                      ]
      

      So this is easily fixed at our end. However, I think it would be better if the code continued to work if displaydata is omitted (it throws a javascript error). I'll submit a patch although this is not urgent.

            quen Sam Marshall
            quen Sam Marshall
            Dani Palou Dani Palou
            Juan Leyva Juan Leyva
            Noel De Martin Noel De Martin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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