- Affected version
- 2.2.12
XML:
<xf:radiorow name="warning_definition_id" value="0"
label="{{ phrase('warning_type') }}">
<xf:foreach loop="$warnings" value="$warning">
<xf:option value="{$warning.warning_definition_id}" class="js-FormFiller">{$warning.title}</xf:option>
</xf:foreach>
<xf:option value="0" class="js-FormFiller"
label="{{ phrase('custom_warning:') }}">
<xf:textbox name="custom_title" maxlength="{{ max_length($warning, 'title') }}" />
</xf:option>
</xf:radiorow>
$warning
is a XF:WarningDefinition
, and not an XF:Warning
as such max_length
is returning null, and no max length is being applied. And then the XF\Entity\Warning::title
property has forced
set so it is silently truncating the title if it is too long.The correct bits should be:
maxlength="{{ max_length('XF:Warning', 'title') }}"
And likely remove the "forced" attribute for the column/property so a message is returned if too long data is actually sent to it
Last edited: