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

Issue with Postgresql and retrieves number of records from course table

    XMLWordPrintable

    Details

    • Database:
      PostgreSQL
    • Testing Instructions:
      Hide

      Needs to be tested on PostgreSQL database

      1. Enable 'List of categories' from Front page items when logged in under Front page settings / ► Edit settings.
      2. Verify the front page and bottom section broken now.
      3. Apply the fix and verify all okay.
      Show
      Needs to be tested on PostgreSQL database Enable 'List of categories' from Front page items when logged in under Front page settings / ► Edit settings. Verify the front page and bottom section broken now. Apply the fix and verify all okay.
    • Workaround:
      Hide

      Remove 'List of categories' from Front page items when logged in under Front page settings / ► Edit settings

      Show
      Remove 'List of categories' from Front page items when logged in under Front page settings / ► Edit settings
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      mdl40120-master

      Description

      When I upgraded to 2.5 from 1.9 via 2.2 I found that the front page was showing this error where the course categories are listed :-

      Default exception handler: Error reading from database Debug:
      ERROR: syntax error at or near "hassummary" at character 116
      SELECT c.id,c.category,c.sortorder,c.shortname,c.fullname,c.idnumber,c.startdate,c.visible,SUBSTR(c.summary, 1, 1) hassummary, ctx.id AS ctxid, ctx.path AS ctxpath, ctx.depth AS ctxdepth, ctx.contextlevel AS ctxlevel, ctx.instanceid AS ctxinstance
      FROM mdl_course c
      JOIN mdl_context ctx ON c.id = ctx.instanceid AND ctx.contextlevel = $1
      WHERE c.id <> $2 AND c.category = $3 ORDER BY c.sortorder
      [array (
      0 => 50,
      1 => '1',
      2 => '11',
      )]
      Error code: dmlreadexception

      • line 423 of /lib/dml/moodle_database.php: dml_read_exception thrown
      • line 288 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
      • line 800 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
      • line 843 of /lib/coursecatlib.php: call to pgsql_native_moodle_database->get_records_sql()
      • line 1260 of /lib/coursecatlib.php: call to coursecat::get_course_records()
      • line 1295 of /lib/coursecatlib.php: call to coursecat->get_courses()
      • line 1452 of /course/renderer.php: call to coursecat->get_courses_count()
      • line 1348 of /course/renderer.php: call to core_course_renderer->coursecat_category()
      • line 1375 of /course/renderer.php: call to core_course_renderer->coursecat_subcategories()
      • line 1477 of /course/renderer.php: call to core_course_renderer->coursecat_category_content()
      • line 1933 of /course/renderer.php: call to core_course_renderer->coursecat_tree()
      • line 254 of /index.php: call to core_course_renderer->frontpage_categories_list()
        , referer: http://localhost/admin/settings.php?section=debugging

        Attachments

          Activity

            People

            Assignee:
            tlock Tim Lock
            Reporter:
            tlock Tim Lock
            Integrator:
            Sam Hemelryk
            Tester:
            Damyon Wiese
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              8/Jul/13