Problem/Motivation
This applies both to the media and the group submodules.
Those use Html::escape()
on the respective entity's label before storing it as the ref_char
for the events log entry. The ref_char
column can contain up to 255 characters, same as the media name/label (and, presumably the group label, as well, though I did not check). However, due to the Html::escape()
call, the resulting string can exceed 255 characters, even if the original label does not.
When saving such a media entity, the events log recording fails with a database exception.
Steps to reproduce
For example, a media with the name/label of '''''''''''''''''''''''''''''''''''''''''''
(43 characters all single quotes), the resulting ref_char
will be
'''''''''''''''''''''''''''''''''''''''''''
(258 characters).
Proposed resolution
Not sure, either remove the Html::escape()
call or manually truncate the result if it's longer than 255 characters.
Remaining tasks
User interface changes
-
API changes
Data model changes