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

Early (web) installation steps lead to table does not exist errors

    XMLWordPrintable

Details

    • Bug
    • Status: Integration review in progress
    • Major
    • Resolution: Unresolved
    • 3.11.6, 4.0
    • None
    • Installation
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MDL-74287-311
    • MDL-74287-400
    • Hide

      New site installation (4.0)

      1. In a terminal, tail your web server logs, e.g.

        $ docker logs docker_webserver_1 -f
        

      2. Start web installation
      3. Confirm you don't see the following in web server logs:

        [Tue Apr 05 23:48:47.286586 2022] [php7:notice] [pid 26] [client 172.23.0.1:55844] Default exception handler: Table "external_functions" does not exist Debug: \nError code: ddltablenotexist\n* line 665 of /lib/dml/moodle_database.php: dml_exception thrown\n* line 1621 of /lib/dml/moodle_database.php: call to moodle_database->where_clause()\n* line 73 of /lib/externallib.php: call to moodle_database->get_record()\n* line 196 of /lib/externallib.php: call to external_api::external_function_info()\n* line 81 of /lib/ajax/service.php: call to external_api::call_external_function()\n* line 33 of /lib/ajax/service-nologin.php: call to require_once()\n, referer: http://localhost:8000/admin/index.php
        

      4. Complete installation
      5. Follow testing instructions from MDL-70947

      Site upgrade (3.9 -> 4.0)

      1. In a terminal, tail your web server logs, e.g.

        $ docker logs docker_webserver_1 -f
        

      2. Install a 3.9 site

        $ git checkout MOODLE_39_STABLE
        $ ... install
        

      3. Login as admin
      4. Switch to fixed 4.0 branch

        $ git checkout MDL-74287
        

      5. Visit site admin to trigger upgrade
      6. Confirm you don't see the following in web server logs:

        [Tue Apr 05 23:41:38.168464 2022] [php7:notice] [pid 19] [client 172.22.0.1:58420] Default exception handler: Can't find data record in database table external_functions. Debug: SELECT * FROM {external_functions} WHERE name = ?\n[array (\n  0 => 'media_videojs_get_language',\n)]\nError code: invalidrecord\n* line 1646 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown\n* line 1622 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()\n* line 73 of /lib/externallib.php: call to moodle_database->get_record()\n* line 196 of /lib/externallib.php: call to external_api::external_function_info()\n* line 81 of /lib/ajax/service.php: call to external_api::call_external_function()\n, referer: http://localhost:8000/admin/index.php
        

      7. Complete upgrade
      Show
      New site installation (4.0) In a terminal, tail your web server logs, e.g. $ docker logs docker_webserver_1 -f Start web installation Confirm you don't see the following in web server logs: [Tue Apr 05 23:48:47.286586 2022] [php7:notice] [pid 26] [client 172.23.0.1:55844] Default exception handler: Table "external_functions" does not exist Debug: \nError code: ddltablenotexist\n* line 665 of /lib/dml/moodle_database.php: dml_exception thrown\n* line 1621 of /lib/dml/moodle_database.php: call to moodle_database->where_clause()\n* line 73 of /lib/externallib.php: call to moodle_database->get_record()\n* line 196 of /lib/externallib.php: call to external_api::external_function_info()\n* line 81 of /lib/ajax/service.php: call to external_api::call_external_function()\n* line 33 of /lib/ajax/service-nologin.php: call to require_once()\n, referer: http://localhost:8000/admin/index.php Complete installation Follow testing instructions from MDL-70947 Site upgrade (3.9 -> 4.0) In a terminal, tail your web server logs, e.g. $ docker logs docker_webserver_1 -f Install a 3.9 site $ git checkout MOODLE_39_STABLE $ ... install Login as admin Switch to fixed 4.0 branch $ git checkout MDL-74287 Visit site admin to trigger upgrade Confirm you don't see the following in web server logs: [Tue Apr 05 23:41:38.168464 2022] [php7:notice] [pid 19] [client 172.22.0.1:58420] Default exception handler: Can't find data record in database table external_functions. Debug: SELECT * FROM {external_functions} WHERE name = ?\n[array (\n 0 => 'media_videojs_get_language',\n)]\nError code: invalidrecord\n* line 1646 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown\n* line 1622 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()\n* line 73 of /lib/externallib.php: call to moodle_database->get_record()\n* line 196 of /lib/externallib.php: call to external_api::external_function_info()\n* line 81 of /lib/ajax/service.php: call to external_api::call_external_function()\n, referer: http://localhost:8000/admin/index.php Complete upgrade

    Description

      Was performing some web installations from scratch when I've seen that, before the tables are installed (environmental checks page, maybe others), this is sent to error logs:

      [21-Mar-2022 19:44:49 Europe/Madrid] Default exception handler: Table "external_functions" does not exist Debug: 
      Error code: ddltablenotexist
      * line 665 of /lib/dml/moodle_database.php: dml_exception thrown
      * line 1574 of /lib/dml/moodle_database.php: call to moodle_database->where_clause()
      * line 73 of /lib/externallib.php: call to moodle_database->get_record()
      * line 196 of /lib/externallib.php: call to external_api::external_function_info()
      * line 81 of /lib/ajax/service.php: call to external_api::call_external_function()
      * line 33 of /lib/ajax/service-nologin.php: call to require_once()
      

      Haven't looked what's causing it (seems to be some AJAX call), but it shouldn't happen. Haven't looked, either, if 311 is also affected or no.

      Installation should happen 100% free of notices/warnings/errors (displayed or in logs).

      Ciao

      Attachments

        Issue Links

          Activity

            People

              pholden Paul Holden
              stronk7 Eloy Lafuente (stronk7)
              Shamim Rezaie Shamim Rezaie
              Andrew Lyons Andrew Lyons
              Matteo Scaramuccia, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours, 10 minutes
                  3h 10m