Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
1.9.5, 1.9.11, 2.0.2, 2.1.3, 2.2, 2.3
-
Linux, PHP 5.2.4, PostgreSQL 8.3
-
PostgreSQL
-
MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
-
MOODLE_22_STABLE
-
MDL-20245_user_preferences2 -
Moderate
-
Description
Noticed in my Postgres log that inserts into the user_preference table have been failing. Here is the log entry:
ERROR: value too long for type character varying(255)
STATEMENT: UPDATE mdl_user_preferences SET value = 'a:2:{s:14:\"aggregatesonly\";a:11:
s:10:\"gradesonly\";a:2:{i:1;s:4:\"1620\";i:2;s:4:\"3024\";}}' WHERE id =
'1619';
A quick look at the DB for the record in question:
select * from mdl_user_preferences where id = '1619';
id | userid | name | value
---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1619 | 12405 | grade_report_grader_collapsed_categories | a:2:{s:14:"aggregatesonly";a:11:
s:10:"gradesonly";a:1:{i:1;s:4:"1620";}}
Unfortunately, I cannot determine how exactly this was triggered. I
cannot decipher exactly what was being clicked on by the user at the
time these things were logged. Any tips on recreating the problem?
If I were to guess, I would say that there is a problem where a
person may belong to too many courses with too many categories and
have PHP pref arrays that don't serialize to a small enough value.
Perhaps the size of the serialized value should be checked or else a
note presented to the user to that the settings were not saved?
Attachments
Issue Links
- has been marked as being related by
-
MDL-30668 Prevent the grader report from storing serialized data in the user_preferences table
-
- Closed
-