I’ve installed the latest Tutor and enabled the discovery/e-commerce plugins. I successfully created a new course in Studio, but I’ve been struggling to specify the price for it.
I followed the instructions on " 6.4.2. Create Course Seats" to create a course but the courses page always pops up an error message about “DataTables warning: table id=courseTable - Ajax error. For more information about this error, please see http://datatables.net/tn/7”. Inspecting the network requests in the browser’s devtools revealed that it was the API call to “/api/v2/courses?format=datatables…” that was returning 502 Bad Gateway error. The same API request without the query parameters would work, and therefore I suspect that it’s the data table configuration that’s causing the error. Any ideas what’s going on? The “Coupons”/“Enterprise Coupons” tabs had the same error (even without any entries created), while “Program Offers”/“Enterprise Program Offers” were fine. Could it be that the Tutor plugin packaged an incompatible UI version?
An additional question is: how exactly should I configure the course price? I have found three possible options but I wonder which one to use:
Create the course in e-commerce course admin for every corresponding course in Studio.
Inspecting the network requests in the browser’s devtools revealed that it was the API call to “/api/v2/courses?format=datatables…” that was returning 502 Bad Gateway error.
502 error means that the service is temporarily unavailable. You did not specify what is the corresponding service: is it ecommerce, discovery, LMS? What is the host name to which the request is sent? What are the logs coming from this service?
It was the ecommerce API, and the service was actually available since I could enter this “https://ecommerce.<LMS.ROOT>/api/v2/courses/” in the browser and get a valid response.
In addition, “api/v2/coupons/categories/” and “/api/v2/catalogs/course_catalogs/” worked, but anything that had the query parameters “/?format=datatables&draw=1&…” would fail.
The ecommerce and discovery logs didn’t have any error messages.
Is there any command that I can run to reset all the ecommerce data?
but the Dockerfile at “env/build/openedx/Dockerfile” always gets overwritten when running the “tutor config save” command. How do I make this setting persistent, @regis ?
Would you like to open a pull request on the tutor-ecommerce repo to push your fix upstream? You only need to add a --buffer-size=8192 option to the uwsgi command. There is no need to make this an environment parameter.
If for some reason you do not have the time to open a pull request, please create a Github issue in the tutor-ecommerce repo describe the problem and your proposed solution (and link to this conversation): https://github.com/overhangio/tutor-ecommerce/issues/new
Thanks for the prompt response, @regis. I filed an issue for this here: https://github.com/overhangio/tutor-ecommerce/issues/14. Unfortunately I couldn’t submit the PR, since I don’t have the dev setup to test the fix, and also there are three Dockerfiles and I’m not sure which one(s) to fix:
$(tutor config printroot)/env/build/openedx/Dockerfile
$(tutor config printroot)/env/plugins/ecommerce/build/ecommerce/Dockerfile
$(tutor config printroot)/env/plugins/discovery/build/discovery/Dockerfile
Nice! But how do I upgrade the ecommerce plugin? I believe I have the new version installed:
$ cat /home/ubuntu/.local/lib/python3.8/site-packages/tutorecommerce/about.py version = “11.0.1”
However, the list command still shows “ecommerce==11.0.0”: