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

After importing terms to glossary course page shows a database error

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.3
    • Fix Version/s: None
    • Component/s: Glossary
    • Labels:
      None
    • Environment:
      LAMP
    • Affected Branches:
      MOODLE_23_STABLE

      Description

      After importing terms to a glossary the course page shows a database error and it is impossible to see the course page.

      To replicate the error:
      1 - Create a Glossary on a course
      2 - Import terms from the following glossary: http://moodle.org/pluginfile.php/855/mod_glossary/attachment/6031/texfilter_glossary_en.xml
      3 - Save an go to the course page
      Result: The course page is incorrectly shown and a error message is shown at the end: Error reading from database

      Could not finda a valid workaround. To get the course page again to display I had to hide the glossary module, or uninstall the module (deleting all glossaries in all courses) and install it again.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            poltawski Dan Poltawski added a comment -

            I can't reprorudce this - I can see E_STRICT error

            Show
            poltawski Dan Poltawski added a comment - I can't reprorudce this - I can see E_STRICT error
            Hide
            salvetore Michael de Raadt added a comment -

            I ran into that PHP strict error also...

            Strict Standards: Creating default object from empty value in D:\xampp\htdocs\moodle_testing\mod\glossary\import.php on line 195

            ...I will report that as a separate issue.

            I did get the following error...

            Error reading from database
            Debug info: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
            SELECT COUNT(*) FROM mdl_glossary_entries ge WHERE ge.timemodified > ? AND ( ge.glossaryid = ? ) )
            [array (
            0 => 1339902900,
            1 => 2,
            )]
            Error code: dmlreadexception
            Stack trace:
             
                line 413 of \lib\dml\moodle_database.php: dml_read_exception thrown
                line 868 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
                line 1341 of \lib\dml\moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
                line 1414 of \lib\dml\moodle_database.php: call to moodle_database->get_record_sql()
                line 1586 of \lib\dml\moodle_database.php: call to moodle_database->get_field_sql()
                line 563 of \mod\glossary\lib.php: call to moodle_database->count_records_sql()
                line 1030 of \course\lib.php: call to glossary_print_recent_activity()
                line 26 of \blocks\recent_activity\block_recent_activity.php: call to print_recent_activity()
                line 281 of \blocks\moodleblock.class.php: call to block_recent_activity->get_content()
                line 232 of \blocks\moodleblock.class.php: call to block_base->formatted_contents()
                line 929 of \lib\blocklib.php: call to block_base->get_content_for_output()
                line 981 of \lib\blocklib.php: call to block_manager->create_block_contents()
                line 352 of \lib\blocklib.php: call to block_manager->ensure_content_created()
                line 7 of \theme\base\layout\general.php: call to block_manager->region_has_content()
                line 765 of \lib\outputrenderers.php: call to include()
                line 712 of \lib\outputrenderers.php: call to core_renderer->render_page_layout()
                line 215 of \course\view.php: call to core_renderer->header()

            This error is appearing after the rendering of the recent activity block, which makes me think this is the same error that Andrew is working on in MDL-33821.

            Show
            salvetore Michael de Raadt added a comment - I ran into that PHP strict error also... Strict Standards: Creating default object from empty value in D:\xampp\htdocs\moodle_testing\mod\glossary\import.php on line 195 ...I will report that as a separate issue. I did get the following error... Error reading from database Debug info: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 SELECT COUNT(*) FROM mdl_glossary_entries ge WHERE ge.timemodified > ? AND ( ge.glossaryid = ? ) ) [array ( 0 => 1339902900, 1 => 2, )] Error code: dmlreadexception Stack trace:   line 413 of \lib\dml\moodle_database.php: dml_read_exception thrown line 868 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end() line 1341 of \lib\dml\moodle_database.php: call to mysqli_native_moodle_database->get_records_sql() line 1414 of \lib\dml\moodle_database.php: call to moodle_database->get_record_sql() line 1586 of \lib\dml\moodle_database.php: call to moodle_database->get_field_sql() line 563 of \mod\glossary\lib.php: call to moodle_database->count_records_sql() line 1030 of \course\lib.php: call to glossary_print_recent_activity() line 26 of \blocks\recent_activity\block_recent_activity.php: call to print_recent_activity() line 281 of \blocks\moodleblock.class.php: call to block_recent_activity->get_content() line 232 of \blocks\moodleblock.class.php: call to block_base->formatted_contents() line 929 of \lib\blocklib.php: call to block_base->get_content_for_output() line 981 of \lib\blocklib.php: call to block_manager->create_block_contents() line 352 of \lib\blocklib.php: call to block_manager->ensure_content_created() line 7 of \theme\base\layout\general.php: call to block_manager->region_has_content() line 765 of \lib\outputrenderers.php: call to include() line 712 of \lib\outputrenderers.php: call to core_renderer->render_page_layout() line 215 of \course\view.php: call to core_renderer->header() This error is appearing after the rendering of the recent activity block, which makes me think this is the same error that Andrew is working on in MDL-33821 .
            Hide
            dobedobedoh Andrew Nicols added a comment -

            Sorry - I looked but couldn't see this issue when I was creating the issue for MDL-33821.

            Since I"ve provided a fix for this in MDL-33821, I'll close this issue as a duplicate.

            Andrew

            Show
            dobedobedoh Andrew Nicols added a comment - Sorry - I looked but couldn't see this issue when I was creating the issue for MDL-33821 . Since I"ve provided a fix for this in MDL-33821 , I'll close this issue as a duplicate. Andrew

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: