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

"Page Contexts" setting not being stored on block settings page

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.4, 2.2, 2.3, 2.4, 2.5
    • Fix Version/s: 2.3.5, 2.4.2
    • Component/s: Blocks
    • Labels:
    • Testing Instructions:
      Hide

      1. Create a category
      2. Create a course underneath the category
      3. View the category and turn editing on
      4. Add a block that includes the "page contexts" setting (e.g. HTML block)
      5. Edit the settings and change the setting "page contexts" to the 2nd option ("Display on category:[category name] and any pages within it").
      6. Save settings
      7. Re-edit settings - previously set page context still be set.

      Also, verify that there are no regressions when editing blocks elsewhere. Test changing this setting for blocks in all sorts of contexts:
      a. Front page
      b. Admin notifications (system context)
      c. Course category page (done above!)
      d. Course page
      e. Module page
      f. User profile page

      Show
      1. Create a category 2. Create a course underneath the category 3. View the category and turn editing on 4. Add a block that includes the "page contexts" setting (e.g. HTML block) 5. Edit the settings and change the setting "page contexts" to the 2nd option ("Display on category: [category name] and any pages within it"). 6. Save settings 7. Re-edit settings - previously set page context still be set. Also, verify that there are no regressions when editing blocks elsewhere. Test changing this setting for blocks in all sorts of contexts: a. Front page b. Admin notifications (system context) c. Course category page (done above!) d. Course page e. Module page f. User profile page
    • Workaround:
      Hide

      Go into the database and manually edit the table "block_instances" changing the field "showinsubcontexts" from 0 to 1, or vice versa.

      Show
      Go into the database and manually edit the table "block_instances" changing the field "showinsubcontexts" from 0 to 1, or vice versa.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      On a clean install of Moodle 2.2.1+ / 2.1.4+:

      1. Create a category
      2. Create a course underneath the category
      3. View the category and turn editing on
      4. Add a block that includes the "page contexts" setting (e.g. HTML block)
      5. Edit the settings and change the setting "page contexts" to the 2nd option ("Display on category:[category name] and any pages within it").
      6. Save settings
      7. Re-edit settings - previously set page context will not have been stored.

      This is true for upgraded installations - the setting will retain whatever it was set to before the upgrade, and will ignore any changes to the setting.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  17 Vote for this issue
                  Watchers:
                  14 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    11/Mar/13