Koa bug or feature

Visiting a course in the course catalogue and clicking “Enrol now” results in the following message: “An error has occurred. Please ensure that you are logged in to enroll.”

Is there a new setting for enrollments that I’m not aware of?

I’m running:
tutor-discovery==11.0.1
tutor-ecommerce==11.0.0
tutor-notes==11.0.0
tutor-openedx==11.0.6

The log printout relevant to the action:

lms_1               | 2021-01-12 05:11:56,255 INFO 7 [tracking] [user None] [ip 172.19.0.1] logger.py:42 - {"name": "/courses/course-v1:edX+DemoX+Demo_Course/about", "context": {"course_id": "course-v1:edX+DemoX+Demo_Course", "course_user_tags": {}, "user_id": null, "path": "/courses/course-v1:edX+DemoX+Demo_Course/about", "org_id": "edX"}, "username": "", "session": "", "ip": "172.19.0.1", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Safari/605.1.15", "host": "local.overhang.io", "referer": "http://local.overhang.io/courses", "accept_language": "nb-no", "event": "{\"GET\": {}, \"POST\": {}}", "time": "2021-01-12T05:11:56.255273+00:00", "event_type": "/courses/course-v1:edX+DemoX+Demo_Course/about", "event_source": "server", "page": null}
    lms_1               | [pid: 7|app: 0|req: 15/61] 172.19.0.14 () {44 vars in 916 bytes} [Tue Jan 12 05:11:56 2021] GET /courses/course-v1:edX+DemoX+Demo_Course/about => generated 16015 bytes in 177 msecs (HTTP/1.0 200) 6 headers in 340 bytes (1 switches on core 0)
    lms_1               | [pid: 27|app: 0|req: 17/62] 172.19.0.14 () {42 vars in 965 bytes} [Tue Jan 12 05:11:56 2021] GET /asset-v1:edX+DemoX+Demo_Course+type@asset+block/images_pl-faculty.png => generated 0 bytes in 36 msecs (HTTP/1.0 404) 3 headers in 99 bytes (1 switches on core 0)
    lms_1               | 2021-01-12 05:11:57,463 INFO 7 [tracking] [user None] [ip 172.19.0.1] logger.py:42 - {"name": "/change_enrollment", "context": {"user_id": null, "path": "/change_enrollment", "course_id": "", "org_id": ""}, "username": "", "session": "", "ip": "172.19.0.1", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Safari/605.1.15", "host": "local.overhang.io", "referer": "http://local.overhang.io/courses/course-v1:edX+DemoX+Demo_Course/about", "accept_language": "nb-no", "event": "{\"GET\": {}, \"POST\": {\"course_id\": [\"course-v1:edX+DemoX+Demo_Course\"], \"enrollment_action\": [\"enroll\"]}}", "time": "2021-01-12T05:11:57.462896+00:00", "event_type": "/change_enrollment", "event_source": "server", "page": null}
    lms_1               | [pid: 7|app: 0|req: 16/63] 172.19.0.14 () {52 vars in 1070 bytes} [Tue Jan 12 05:11:57 2021] POST /change_enrollment => generated 0 bytes in 30 msecs (HTTP/1.0 403) 6 headers in 215 bytes (1 switches on core 0)

Clicking “Enroll Now” used to redirect to the sign in / register page if I was not logged in.

Unfortunately, this is a “feature” :-/ It is also being discussed here: https://discuss.openedx.org/t/course-enrollment-for-anonymous-users/3883
You should signal your interest in a resolution. I know for a fact that some people from the community are working on a fix, which should be pretty simple.

1 Like

My interest has been flagged :slight_smile:

I’d like to bump this as it’s annoying and unnecessary. Should we do a manual fix?

I agree with you that it’s annoying and should be considered as a bug. Can I suggest that you comment in the upstream topic? Someone should create an issue and add it to the build/test/release working group project board.