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

    Details

    • Type: Bug
    • Status: Waiting for testing
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7.1
    • Fix Version/s: None
    • Component/s: Blocks
    • Labels:
    • Sprint:
      Moodle App 3.8.0

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              quen Sam Marshall
              Reporter:
              quen Sam Marshall
              Peer reviewer:
              Dani Palou
              Integrator:
              Juan Leyva
              Tester:
              Pau Ferrer
              Participants:
              Component watchers:
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: