sebsoftnl / moodle-enrol_gwpayments

Other
2 stars 3 forks source link

Error when deleting coupons #18

Closed 8com-Moodle closed 5 months ago

8com-Moodle commented 6 months ago

Hi, When I tried to delete coupons. I got this error message and no one of the coupons can be deleted.

tesss

dreblen commented 6 months ago

The following is based on our experience with the same issue in Moodle 4.3.2.

The error seems to be coming from the fact that the "Delete Coupon" form is having two hidden inputs added with the name "id" (one from \classes\local\coupons\coupondelete.php:65 and one from \classes\local\coupons\controller.php:181). The first one never gets a value, so while the second is (partially) processed successfully, the first one results in a failed lookup at \classes\local\coupons\controller.php:184.

Here is a possible fix for the problem: 20240506-delete-coupon.patch

8com-Moodle commented 5 months ago

worked. thanks.

dreblen commented 5 months ago

Is there a chance of this being fixed in an official release? My environment doesn't really allow for self-maintained patches.

sebastianberm commented 5 months ago

Yes, however, this is one of the open source projects, so we only have a limited amount of time per project. That being said, I'll create an upstream release later today.