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

Searching site settings causes blocks to disappear

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2, 2.3
    • Fix Version/s: 2.2.2
    • Component/s: Administration, Blocks
    • Labels:

      Description

      If you log in as admin and search for something in the Settings block your search results are displayed but all the blocks have disappeared.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              salvetore Michael de Raadt added a comment -

              This does not seem to affect the 2.1 branch.

              I couldn't see any recent change to the search.php file itself, so I assume it has something to do with the layout.

              Perhaps this is related to MDL-30340, which has not yet been backported.

              Show
              salvetore Michael de Raadt added a comment - This does not seem to affect the 2.1 branch. I couldn't see any recent change to the search.php file itself, so I assume it has something to do with the layout. Perhaps this is related to MDL-30340 , which has not yet been backported.
              Hide
              salvetore Michael de Raadt added a comment -

              Increasing the priority on this because it's really annoying me.

              Show
              salvetore Michael de Raadt added a comment - Increasing the priority on this because it's really annoying me.
              Hide
              samhemelryk Sam Hemelryk added a comment -

              I have to get going to the night IMMEDIATELY, however the solution for this problem is simple.
              Raj wanna turn it into a branch for me and peer-review?
              If not no probs I'll do it tomorrow when I am online.

               
              diff --git a/admin/search.php b/admin/search.php
              index 55d93c0..99ddf7e 100644
              --- a/admin/search.php
              +++ b/admin/search.php
              @@ -10,14 +10,14 @@ $query = trim(optional_param('query', '', PARAM_NOTAGS));  // Search string
               $PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
               $PAGE->set_course($SITE);
               
              +admin_externalpage_setup('search', '', array('query' => $query)); // now hidden page
              +
               $adminroot = admin_get_root(); // need all settings here
               $adminroot->search = $query; // So we can reference it in search boxes later in this invocation
               $statusmsg = '';
               $errormsg  = '';
               $focus = '';
               
              -admin_externalpage_setup('search', '', array('query' => $query)); // now hidden page
              -
               // now we'll deal with the case that the admin has submitted the form with changed settings
               if ($data = data_submitted() and confirm_sesskey()) {
                   if (admin_write_settings($data)) {
               

              Cheers
              Sam

              Show
              samhemelryk Sam Hemelryk added a comment - I have to get going to the night IMMEDIATELY, however the solution for this problem is simple. Raj wanna turn it into a branch for me and peer-review? If not no probs I'll do it tomorrow when I am online.   diff --git a/admin/search.php b/admin/search.php index 55d93c0..99ddf7e 100644 --- a/admin/search.php +++ b/admin/search.php @@ -10,14 +10,14 @@ $query = trim(optional_param('query', '', PARAM_NOTAGS)); // Search string $PAGE->set_context(get_context_instance(CONTEXT_SYSTEM)); $PAGE->set_course($SITE); +admin_externalpage_setup('search', '', array('query' => $query)); // now hidden page + $adminroot = admin_get_root(); // need all settings here $adminroot->search = $query; // So we can reference it in search boxes later in this invocation $statusmsg = ''; $errormsg = ''; $focus = ''; -admin_externalpage_setup('search', '', array('query' => $query)); // now hidden page - // now we'll deal with the case that the admin has submitted the form with changed settings if ($data = data_submitted() and confirm_sesskey()) { if (admin_write_settings($data)) {   Cheers Sam
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Ohh and remove `$PAGE->set_course($SITE);` that is totally unnecessary!

              Show
              samhemelryk Sam Hemelryk added a comment - Ohh and remove `$PAGE->set_course($SITE);` that is totally unnecessary!
              Hide
              rajeshtaneja Rajesh Taneja added a comment - - edited

              Thanks Sam, for spot-on patch.
              I have created branches and pushing it for peer-review.

              Show
              rajeshtaneja Rajesh Taneja added a comment - - edited Thanks Sam, for spot-on patch. I have created branches and pushing it for peer-review.
              Hide
              salvetore Michael de Raadt added a comment -

              Thanks for working on this, Sam.

              That changed worked for me.

              Show
              salvetore Michael de Raadt added a comment - Thanks for working on this, Sam. That changed worked for me.
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              Pushing it for integration review...

              Show
              rajeshtaneja Rajesh Taneja added a comment - Pushing it for integration review...
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Integrated, thanks!

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

              And test passed, I was really curious because I use the search facility a lot and had not noticed that at all. Now works properly.

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - And test passed, I was really curious because I use the search facility a lot and had not noticed that at all. Now works properly.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              This virus has been spread upstream, everybody will be infected soon. Congrats, you did it!

              Closing, ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - This virus has been spread upstream, everybody will be infected soon. Congrats, you did it! Closing, ciao

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    12/Mar/12