Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-3568

quickfindlist block throws sql error after adding to mymoodle page

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.2
    • Fix Version/s: None
    • Component/s: Block: Quick find list
    • Labels:
      None
    • Affected Branches:
      MOODLE_22_STABLE

      Description

      Hi,

      I have added quickfindlist as a student user to mymoodle page. After doing this, mymoodle page stays white without any output.

      Apache log gives this error:
      [Tue Apr 03 10:06:22 2012] [error] Default exception handler: Fehler beim Lesen der Datenbank Debug: ERROR: column "quickfindlist" does not exist at character 120\nSELECT * FROM mdl_block AS b\n JOIN mdl_block_instances AS bi ON b.name = blockname WHERE name = "quickfindlist"\n AND pagetypepattern = "$1"\n AND parentcontextid = $2\n AND bi.id < $3\n[array (\n 0 => 'my-index',\n 1 => '5406',\n 2 => '1398',\n)]\n* line 394 of /lib/dml/moodle_database.php: dml_read_exception thrown\n* line 232 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()\n* line 678 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()\n* line 74 of /blocks/quickfindlist/block_quickfindlist.php: call to pgsql_native_moodle_database->get_records_sql()\n* line 280 of /blocks/moodleblock.class.php: call to block_quickfindlist->get_content()\n* line 232 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()\n* line 926 of /lib/blocklib.php: call to block_base->get_content_for_output()\n* line 978 of /lib/blocklib.php: call to block_manager->create_block_contents()\n* line 349 of /lib/blocklib.php: call to block_manager->ensure_content_created()\n* line 8 of /theme/uni/layout/general.php: call to block_manager->region_has_content()\n* line 685 of /lib/outputrenderers.php: call to include()\n* line 637 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()\n* line 146 of /my/index.php: call to core_renderer->header()\n, referer: https://[...]/my/index.php

      After removing the sql query

      $select = 'SELECT * ';
      $from = 'FROM

      {block} AS b
      JOIN {block_instances} AS bi ON b.name = blockname ';
      $where = 'WHERE name = "quickfindlist"
      AND pagetypepattern = "?"
      AND parentcontextid = ?
      AND bi.id < ?';


      from /blocks/quickfindlist/block_quickfindlist.php, mymoodle page reappears.

      When visiting block settings page after that, there is a similar error. After removing sql query


      $select = 'SELECT * ';
      $from = 'FROM {block}

      AS b
      JOIN

      {block_instances}

      AS bi ON b.name = blockname ';
      $where = 'WHERE name = "quickfindlist"
      AND pagetypepattern = "?"
      AND parentcontextid = ?
      AND bi.id < ?';

      from /blocks/quickfindlist/edit_form.php, the settings page appears (but is slightly broken of course).

      Summing up, there seems to be some sort of start-up problem with the block.

      PS: I'm using PostgreSQL

      Thanks in advance
      Alex

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: