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

    Details

    • Testing Instructions:
      Hide

      Unit tests

      $ vendor/bin/phpunit enrol/tests/enrollib_test.php
      

      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 enrol/tests/enrollib_test.php 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
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_400_STABLE
    • Pull 3.9 Branch:
    • Pull 3.10 Branch:
      MDL-70099-310
    • Pull 3.11 Branch:
      MDL-70099-311
    • Pull Master Branch:

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pholden Paul Holden
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

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