danmarsden / moodle-mod_attendance

Allows an attendance log to be kept in Moodle
https://moodle.org/plugins/mod_attendance
64 stars 151 forks source link

null name given when Save and Display causes error #762

Closed krajewsk closed 3 weeks ago

krajewsk commented 1 month ago

We're testing the latest (2024072400) plugin version on our. test server (Moodle 4.4+ (Build: 20240425)).

When we Save and Display the following error is thrown. Is anyone else seeing this?

Exception - core_courseformat\hook\after_cm_name_edited::__construct(): Argument #2 ($newname) must be of type string, null given, called in [dirroot]/course/modlib.php on line 733

More information about this error

Debug info: Error code: generalexceptionmessage×Dismiss this notification Stack trace: line 36 of /course/format/classes/hook/after_cm_name_edited.php: TypeError thrown line 733 of /course/modlib.php: call to core_courseformat\hook\after_cm_name_edited->__construct() line 183 of /course/modedit.php: call to update_moduleinfo()

danmarsden commented 1 month ago

I haven't been able to reproduce this and it's not showing up in the behat tests on the repo either.

Do you have any other plugins on your site or custom course formats that might be causing this? - does it happen when you try to add plugins for other 3rd party plugins? - can you try upgrading to the latest stable release of Moodle 4.4 to see if that improves anything?

krajewsk commented 3 weeks ago

Thanks Dan. It does look like it could be another plugin interfering with the save. When I remove one other plugin the save works. We have over 70 non-core plugins running.