Moodle
  1. Moodle
  2. MDL-39585

All filters disabled after 2.4 to 2.5 upgrade

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.5
    • Component/s: Filters
    • Labels:
    • Testing Instructions:
      Hide

      Testing difficulty: medium (requires site upgrade)

      1. Prepare (new or existing) recent Moodle 2.4.3+ site.
      2. Enable some text filters and override some of them at the course context.
      3. Upgrade the site to the recent 2.5
      4. TEST: Make sure the filters configuration has not changed.

      Show
      Testing difficulty: medium (requires site upgrade) 1. Prepare (new or existing) recent Moodle 2.4.3+ site. 2. Enable some text filters and override some of them at the course context. 3. Upgrade the site to the recent 2.5 4. TEST: Make sure the filters configuration has not changed.
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-39585-filters-upgrade
    • Rank:
      50272

      Description

      Observed problem:

      After the recent 2.4 -> recent 2.5 upgrade, all filters are disabled. More than that, there are invalid obsolete records for legacy filer names displayed (like "filter/tex") as missing and the new ones (like "tex") are disabled.

      Reason:

      Early in 2.5dev cycle, the upgrade step was introduced to convert legacy filter names (like "filter/tex") to new ones (like "tex") - see patch 0662bd677ca44bdd20b883a2c106ffc56f0574e8 (MDL-29996). This upgrade step was using the stable-like versioning:

      if ($oldversion < 2012120300.07) {
      

      but was integrated on master only (thence did not following the on-sync policy).

      Because now, the stable version number is higher than that upgrade step, it is not executed which causes the observed behaviour.

        Issue Links

          Activity

          Hide
          David Mudrak added a comment -

          Submitting for integration. I believe it is enough to fix the version number in the upgrade to make sure it is always executed when upgrading from 2.4.x site.

          Note that this will not fix existing 2.5-beta sites. This was discussed and decided we will not try to fix those:

          (10:39:23) DavidMudrak: For the record, I already know the reason for that disabled filters issue, working on a patch
          (10:41:18) Martin Dougiamas: \o/
          (10:42:20) DavidMudrak: just wondering, now as we are in beta, should we support upgrading from one 2.5 to another?
          (10:42:33) DavidMudrak: or can I still require recent 2.4?
          (10:42:40) Martin Dougiamas: For this I don't think you need to worry
          (10:42:43) DavidMudrak: (I need to fix the main lib/db/upgrade.php)
          (10:43:04) Martin Dougiamas: since it's manually fixable by anyone who upgraded production sites to the beta
          (10:43:09) Martin Dougiamas: using the UI
          (10:43:32) DavidMudrak: cool, makes thing easier
          (10:43:39) DavidMudrak: and safer
          (10:43:52) Martin Dougiamas: yeah
          (10:45:24) petr.skoda: thanks david, please explain the versioning trouble in first master integration cycles to integrators

          Show
          David Mudrak added a comment - Submitting for integration. I believe it is enough to fix the version number in the upgrade to make sure it is always executed when upgrading from 2.4.x site. Note that this will not fix existing 2.5-beta sites. This was discussed and decided we will not try to fix those: (10:39:23) DavidMudrak: For the record, I already know the reason for that disabled filters issue, working on a patch (10:41:18) Martin Dougiamas: \o/ (10:42:20) DavidMudrak: just wondering, now as we are in beta, should we support upgrading from one 2.5 to another? (10:42:33) DavidMudrak: or can I still require recent 2.4? (10:42:40) Martin Dougiamas: For this I don't think you need to worry (10:42:43) DavidMudrak: (I need to fix the main lib/db/upgrade.php) (10:43:04) Martin Dougiamas: since it's manually fixable by anyone who upgraded production sites to the beta (10:43:09) Martin Dougiamas: using the UI (10:43:32) DavidMudrak: cool, makes thing easier (10:43:39) DavidMudrak: and safer (10:43:52) Martin Dougiamas: yeah (10:45:24) petr.skoda: thanks david, please explain the versioning trouble in first master integration cycles to integrators
          Hide
          David Mudrak added a comment -
          Show
          David Mudrak added a comment - See https://docs.google.com/spreadsheet/ccc?key=0AiVGK6tbSC9OdDB2a1dRLVdiUG1OR1NYbDFzeklCbmc#gid=0 for an overview of versioning mismatch that caused this.
          Hide
          Petr Škoda added a comment -

          +1 thanks

          Show
          Petr Škoda added a comment - +1 thanks
          Show
          Eloy Lafuente (stronk7) added a comment - For cross-reference: https://tracker.moodle.org/browse/MDL-29996?focusedCommentId=221538&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-221538
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Thanks David, well spotted. That bloody upgrade was one of the very-first after the on-sync period (that I think we have under control with continuous diffs and friends). And the (wrong, reserved for 24_STABLE), version escaped out scrutiny.

          I'm going to add that check to MDLSITE-1973 so cannot happen anymore. Also have shared it with the rest of the [ip]Team.

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Thanks David, well spotted. That bloody upgrade was one of the very-first after the on-sync period (that I think we have under control with continuous diffs and friends). And the (wrong, reserved for 24_STABLE), version escaped out scrutiny. I'm going to add that check to MDLSITE-1973 so cannot happen anymore. Also have shared it with the rest of the [ip] Team. Ciao
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated, thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
          Hide
          Sam Hemelryk added a comment -

          Thanks guys, ran through two upgrade this morning and can confirm filter config stayed perfectly in tact.
          Test passed.

          Many thanks
          Sam

          Show
          Sam Hemelryk added a comment - Thanks guys, ran through two upgrade this morning and can confirm filter config stayed perfectly in tact. Test passed. Many thanks Sam
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Did you think this day was not going to arrive ever?

          Your patience has been rewarded, yay, sent upstream, thanks!

          Closing...ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Did you think this day was not going to arrive ever? Your patience has been rewarded, yay, sent upstream, thanks! Closing...ciao
          Hide
          Anthony Borrow added a comment -

          Are we sure that filters are working in 2.5? I tried on qa.moodle.net (which is now running 2.6dev), a demo server and my test server to create an autolink based on the Activity name and have not been able to get it working. Peace - Anthony

          Show
          Anthony Borrow added a comment - Are we sure that filters are working in 2.5? I tried on qa.moodle.net (which is now running 2.6dev), a demo server and my test server to create an autolink based on the Activity name and have not been able to get it working. Peace - Anthony
          Hide
          Anthony Borrow added a comment -

          Alright, I tested on 2.4 and the activity name autolink filter works as I would expect it; however, it is not working in Moodle 2.5. I will file a separate issue. Peace - Anthony

          Show
          Anthony Borrow added a comment - Alright, I tested on 2.4 and the activity name autolink filter works as I would expect it; however, it is not working in Moodle 2.5. I will file a separate issue. Peace - Anthony
          Hide
          Michael de Raadt added a comment - - edited

          Sorry, ignore that comment. I posted on the wrong issue.

          Show
          Michael de Raadt added a comment - - edited Sorry, ignore that comment. I posted on the wrong issue.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: