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

Global search course custom fields indexing is trying to read the field with id 1

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Use a fresh site without any course custom fields
      2. Enable global search (Admin > Advanced features)
      3. Go to Site administration > Plugins > Search > Search areas and disable all areas but "Course custom fields" to make indexing faster.
      4. Install tool_certificate (https://moodle.org/plugins/tool_certificate) and mod_coursecertificate (https://moodle.org/plugins/mod_coursecertificate) plugins (for Moodle 3.8 you will need to modify the required moodle version in the version.php)
      5. Create a new course and enrol a student to it
      6. Add a new Course certificate instance to the course, with default demo template and no access restriction
      7. Log in as the student
      8. Visit the certificate module page to get the certificate issued.
      9. As admin, run the scheduled task core\task\search_index_task via the command line:

        php admin/cli/scheduled_task.php --execute="\core\task\search_index_task"

      10. TEST Make sure the task finishes succesfully and you do not see "Exception - Call to a member function get() on null"
      Show
      Use a fresh site without any course custom fields Enable global search (Admin > Advanced features) Go to Site administration > Plugins > Search > Search areas and disable all areas but "Course custom fields" to make indexing faster. Install tool_certificate ( https://moodle.org/plugins/tool_certificate ) and mod_coursecertificate ( https://moodle.org/plugins/mod_coursecertificate ) plugins (for Moodle 3.8 you will need to modify the required moodle version in the version.php) Create a new course and enrol a student to it Add a new Course certificate instance to the course, with default demo template and no access restriction Log in as the student Visit the certificate module page to get the certificate issued. As admin, run the scheduled task core\task\search_index_task via the command line: php admin/cli/scheduled_task.php --execute= "\core\task\search_index_task" TEST Make sure the task finishes succesfully and you do not see "Exception - Call to a member function get() on null"
    • Workaround:
      Hide

      Go to /admin/tool/certificate/customfield.php and delete the field with id=1

      It will get re-created and it will stop making the task fail.

      Show
      Go to /admin/tool/certificate/customfield.php and delete the field with id=1 It will get re-created and it will stop making the task fail.
    • Affected Branches:
      MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE, MOODLE_39_STABLE
    • Pull 3.9 Branch:
    • Pull 3.10 Branch:
      MDL-69902-310
    • Pull Master Branch:

      Attachments

        Issue Links

          Activity

            People

            Assignee:
            marina Marina Glancy
            Reporter:
            marina Marina Glancy
            Peer reviewer:
            David Mudrák (@mudrd8mz) David Mudrák (@mudrd8mz)
            Integrator:
            Jake Dallimore Jake Dallimore
            Tester:
            Janelle Barcega Janelle Barcega
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              9/Nov/20

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 35 minutes
                4h 35m