-
Bug
-
Resolution: Fixed
-
Critical
-
2.3.3, 2.6.3, 2.7
-
MOODLE_23_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
-
MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
-
All web service calls are written to the log with the function used as the "action." By default the maximum length of "action" in prefix_log is 40 characters. However, there's nothing stopping you from creating a custom web service function with a longer name than that. Here's a sample stack trace illustrating the problem. My custom function was 45 characters long:
[Fri Nov 16 13:56:25 2012] [error] [client xxx.xxx.xxx.xxx] Debugging: Error: Could not insert a new entry to the Moodle log. Data too long for column 'action' at row 1
- line 1725 of /lib/datalib.php: call to debugging()
- line 1523 of /webservice/lib.php: call to add_to_log()
- line 46 of /webservice/rest/server.php: call to webservice_base_server->run()
I think the right way would be to either impose a limit from the interface or truncate the function name in the log. Note that the web service will still work properly, it just won't log the action.
- is duplicated by
-
MDL-45517 legacy_add_to_log and add_to_log doesn't check the action field lenght
- Closed
-
MDL-43644 Mobile Web Service 'Could not insert a new entry to the Moodle log'
- Closed
- will be (partly) resolved by
-
MDL-35601 Too short mdl_log.action causing "Could not insert a new entry to the Moodle log"
- Closed
- will help resolve
-
MOBILE-515 Insert into log failed
- Resolved
-
MDL-39984 Insert into log failed - action field to small for error code
- Closed
-
MDL-32543 After an update in some circumstances the field size of mdl_log.action is smaller than log_display.action
- Closed