Wunderbyte-GmbH / moodle-mod_booking

Moodle Booking Module
https://www.wunderbyte.at
21 stars 39 forks source link

Link error in reminder emails #554

Open osel21 opened 3 months ago

osel21 commented 3 months ago

Describe the bug We are experiencing a problem with our Kubernetes Moodle Deployement. The links to the courses and booking options sent into the reminder emails appears to be broken. In particular the website URL is not resolved correctly and it appears to be 127.0.0.1:8080/booking... or 127.0.0.1:8080/course/ (sometimes is resolved as ..svc.cluster.locall/booking... or ..svc.cluster.local/courses...). In the email appears the Kubernetes Service hostname that obviously is not reachable from outside of the cluster.

Versions uses Moodle version: 4.3.2 Boooking version: 8.2.4 (pro)

To Reproduce We can provide an account to our staging platform to reproduce the issue.

Expected behavior We expect to have the correct URLs

Screenshots image

Additional context We are using google cloud platform with kubernetes The config.php hostname setting is $_SERVER['HTTP_HOST'];

dasistwas commented 3 months ago

@georgmaisser looks like the URL is not rendered in a correct way.

dasistwas commented 3 months ago

Dear @osel21, we had a look at the code and it seems we use default Moodle way to generate links. Did you specify

$CFG->sslproxy = true;

OR

$CFG->reverseproxy = true;

It seems you are using a reverse proxy. So that would be mandatory for your installation.

georgmaisser commented 2 months ago

Please tell us if you could fix it. We leave this open for a while if anybody else encounters the problem. We could not reproduce it with a correctly set up Moodle platform.

osel21 commented 2 months ago

With the reverse proxy settings the platform is unreachable. We are still searching for a fix.