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: Closed
    • Major
    • Resolution: Fixed
    • 3.11.6, 4.0
    • 3.11.8, 4.0.2
    • Installation
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MDL-74287-311
    • MDL-74287-400
    • Hide

      New site installation

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

        # For an Ubuntu server:
        $ tail -f /var/log/apache2/error.log
        

      2. Start web installation
        1. 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
          

      3. Complete the installation

      Atto Image:

      1. Start writing a new forum discussion and add something to all required form fields.
      2. Drag-and-drop a large image into atto (it probably helps to use your browser developer tools to throttle your connection.)
      3. Verify that the "Submit" button of the form is disabled.
      4. Now, wait for the file upload to complete. You should see the loading icon in the atto area will disappear.
      5. Verify that the "Submit" button of the form is enabled.
      6. Click the "Submit" button and Verify you are not prompted and that the form submits without error.

      File manager:

      1. Create an assignment in a course allowing file submissions.
      2. Log in as a student in the course, go to the assignment page.
      3. Open your browser's dev tools and in the network tab (chrome and firefox have this), you'll see a 'throttling' menu item near the right side. Set this to '3G' or the like, preferable as slow as you can set it.
      4. Now, drag a 1MB image file (or thereabouts in size) from your local filesystem to the submission area. Don't use the file selector dialogue.
      5. Verify that the "Submit" button of the form is disabled.
      6. Now, wait for the file upload to complete. You should see the file icon in the submission area and the grey bar will disappear.
      7. Verify that the "Submit" button of the form is enabled.
      8. Click the "Submit" button and Verify you are not prompted and that the form submits without error.

      Site upgrade (from 3.9)

      1. Uninstall your site (e.g. if using MDK, "mdk uninstall -y")
      2. In a terminal, tail your web server logs
      3. Install a 3.9 site

        $ git checkout MOODLE_39_STABLE

      4. Install the site. e.g. if using MDK

        $ mdk install
        

      5. Switch to the branch you're testing:
        • 311

          git checkout MOODLE_311_STABLE
          

        • 400

          git checkout MOODLE_400_STABLE
          

        • master

          git checkout master
          

      6. Login as admin and run through the upgrade
        1. 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
          

      Show
      New site installation In a terminal, tail your web server logs, e.g. # For an Ubuntu server: $ tail -f /var/log/apache2/error.log 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 the installation Atto Image: Start writing a new forum discussion and add something to all required form fields. Drag-and-drop a large image into atto (it probably helps to use your browser developer tools to throttle your connection.) Verify that the "Submit" button of the form is disabled. Now, wait for the file upload to complete. You should see the loading icon in the atto area will disappear. Verify  that the "Submit" button of the form is enabled. Click the "Submit" button and Verify you are not prompted and that the form submits without error. File manager: Create an assignment in a course allowing file submissions. Log in as a student in the course, go to the assignment page. Open your browser's dev tools and in the network tab (chrome and firefox have this), you'll see a 'throttling' menu item near the right side. Set this to '3G' or the like, preferable as slow as you can set it. Now, drag a 1MB image file (or thereabouts in size) from your local filesystem to the submission area. Don't use the file selector dialogue. Verify that the "Submit" button of the form is disabled. Now, wait for the file upload to complete. You should see the file icon in the submission area and the grey bar will disappear. Verify  that the "Submit" button of the form is enabled. Click the "Submit" button and Verify you are not prompted and that the form submits without error. Site upgrade (from 3.9) Uninstall your site (e.g. if using MDK, " mdk uninstall -y ") In a terminal, tail your web server logs Install a 3.9 site $ git checkout MOODLE_39_STABLE Install the site. e.g. if using MDK $ mdk install Switch to the branch you're testing: 311 git checkout MOODLE_311_STABLE 400 git checkout MOODLE_400_STABLE master git checkout master Login as admin and run through the 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

    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

        1. image-2022-06-30-18-29-45-185.png
          image-2022-06-30-18-29-45-185.png
          52 kB
        2. MDL-74287_master - Atto.mp4
          1.27 MB
        3. MDL-74287_master - Submission.mp4
          705 kB
        4. MDL-74287_v311 - Atto.mp4
          545 kB
        5. MDL-74287_v311 - Atto-1.mp4
          545 kB
        6. MDL-74287_v311 - Submission.mp4
          1.20 MB
        7. MDL-74287_v311 - Submission-1.mp4
          1.20 MB
        8. MDL-74287_v400 - Atto.mp4
          777 kB
        9. MDL-74287_v400 - Submission.mp4
          561 kB
        10. Server Log 2 - MDL-74287_master.png
          Server Log 2 - MDL-74287_master.png
          99 kB
        11. Server Log 2 - MDL-74287_v311.png
          Server Log 2 - MDL-74287_v311.png
          113 kB
        12. Server Log 2 - MDL-74287_v400.png
          Server Log 2 - MDL-74287_v400.png
          79 kB
        13. Server Log - MDL-74287_master.png
          Server Log - MDL-74287_master.png
          52 kB
        14. Server Log - MDL-74287_v311.png
          Server Log - MDL-74287_v311.png
          52 kB
        15. Server Log - MDL-74287_v400.png
          Server Log - MDL-74287_v400.png
          52 kB

        Issue Links

          Activity

            People

              pholden Paul Holden
              stronk7 Eloy Lafuente (stronk7)
              Shamim Rezaie Shamim Rezaie
              Andrew Lyons Andrew Lyons
              John Edward Pedregosa John Edward Pedregosa
              Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11/Jul/22

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days, 10 minutes
                  2d 10m