Closed kristian-94 closed 5 years ago
We also should be checking for this in unit tests
Update:
It turns out that this bug is not caused by the customdata field having type text, but rather the resourcekey field. Looking through the plugin history, I can't see any way that the resourcekey field could end up with type text through normal use of the plugin since it is never set to text before or after any upgrade. This bug may be a local issue/bug in this case, although it has happened across different environments with different versions of the plugin that this resourcekey field has been changed to a text type. Further investigation into the cause of that is ongoing
so @kristian-94 is this a close as 'nothing to do' ?
Yes, let's close it. Looks like the plugin's code is fine , this issue is caused by something else.
https://github.com/catalyst/moodle-tool_lockstats/blob/master/db/upgrade.php#L186 We have changed this DB field 'customdata' to text. However, during a log_unlock function, this can cause an error when trying to delete records since text isn't allowed in the where clause:
This area of the plugin needs to be rewritten to handle deletion when the field is a text type, or we need to change the DB field to a larger varchar type instead.
https://github.com/catalyst/moodle-tool_lockstats/blob/master/classes/proxy_lock_factory.php#L336