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

html block: configdata fortmat changed ==> break

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Blocks
    • Labels:
      None
    • Database:
      Any
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      While implementing restore of html blocks, testing it against one new backup I've discovered that the internals of the "configdata" have changed recently! Obviously that breaks, at least, upgraded sites and backup/restore.

      Moodle 1.9 (and HEAD 3 months ago, where my test backup file is dated) structure for one html block configdata was:

      array {
          'title' => xxxxx
          'text' => yyyyy
      }

      and current structure in HEAD is:

      array {
          'title' => xxxxx
          'text' => array {
              'text' => yyyyy
              'format' => 1
              'itemid' => zzzzz
          }
      }

      IMO the "double text" nesting seems incorrectly, form data must be handled in another way.

      IMO we need to:

      1) restore the structure to the one being used until 3 months ago (plain array). That will guarantee upgrade/backup/restore to work.
      2) in upgrade, look for any ocurrence using the "wrong" format (isset[$configdata['text']['text']) and transform it to the "correct one".

      Ciao

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10