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

coding_exceptions detected running 'Users can auto-enrol themself in courses where self enrolment is allowed'

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE, MOODLE_39_STABLE
    • Hide

      Unit tests

      $ vendor/bin/phpunit --filter core_enrollib_testcase
      

      Behat

      1. Run the following scenario repeatedly (x2) using the classic theme, e.g.:

        $ bin/moodle-docker-compose exec --user www-data webserver php admin/tool/behat/cli/run.php --suite=classic --name="Edit a self-enrolled user's enrolment from the course participants page"
        

      2. Confirm you don't see the following exception in your webserver logs, e.g.:

        $ docker logs docker_webserver_1 -f
        [...]
        [Tue Nov 03 09:23:33.820197 2020] [php7:notice] [pid 20] [client 172.21.0.2:43072] Default exception handler: Coding error detected, it must be fixed by a programmer: No further information available for this branch
        Debug: \nError code: codingerror\n* line 129 of /lib/ajax/getnavbranch.php: coding_exception thrown\n,
        referer: http://webserver/course/view.php?id=102000
        

      Show
      Unit tests $ vendor/bin/phpunit --filter core_enrollib_testcase Behat Run the following scenario repeatedly (x2) using the classic theme, e.g.: $ bin/moodle-docker-compose exec --user www-data webserver php admin/tool/behat/cli/run.php --suite=classic --name="Edit a self-enrolled user's enrolment from the course participants page" Confirm you don't see the following exception in your webserver logs, e.g.: $ docker logs docker_webserver_1 -f [...] [Tue Nov 03 09:23:33.820197 2020] [php7:notice] [pid 20] [client 172.21.0.2:43072] Default exception handler: Coding error detected, it must be fixed by a programmer: No further information available for this branch Debug: \nError code: codingerror\n* line 129 of /lib/ajax/getnavbranch.php: coding_exception thrown\n, referer: http://webserver/course/view.php?id=102000

      This has been detected @ MDL-69971 and, unless I missed them originally, they weren't around a couple of weeks ago. It's the called "Problem E" there.

      There are 2 entries in the webserver error logs:

      [Mon Nov 02 08:43:37.161356 2020] [php7:notice] [pid 26353] [client 127.0.0.1:62894] Default exception handler: Coding error detected, it must be fixed by a programmer: No further information available for this branch Debug: \nError code: codingerror\n* line 129 of /lib/ajax/getnavbranch.php: coding_exception thrown\n, referer: http://127.0.0.1/~stronk7/behattesting/course/view.php?id=103000
      [Mon Nov 02 08:43:58.161100 2020] [php7:notice] [pid 26673] [client 127.0.0.1:63330] Default exception handler: Coding error detected, it must be fixed by a programmer: No further information available for this branch Debug: \nError code: codingerror\n* line 129 of /lib/ajax/getnavbranch.php: coding_exception thrown\n, referer: http://127.0.0.1/~stronk7/behattesting/course/view.php?id=103000
      

      when running behat tests against classic. The problem has been narrowed to these 2 scenarios:

       
      - Edit a self-enrolled user's enrolment from the course participants page
      - Unenrol a self-enrolled student from the course participants page
      

      (note that they pass, just there is some (ajax) request ending with error)

      Maybe important note: The errors are super-similar with problem D) that was fixed 1 week ago (see (MDL-69993). So, maybe, not-confirmed, just a bet... these 2 new similar erros could be an effect of it. Again, worth confirming, it's surprising that they are happening in the same area.

      Ciao

            pholden Paul Holden
            stronk7 Eloy Lafuente (stronk7)
            Tim Hunt Tim Hunt
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 45 minutes
                2h 45m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.