You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found this issue when working on tests for #9696. Once that's merged in, a test case for this issue can be added to the providerSummary provider there.
michalkleiner
changed the title
DBText::Summary only adds ellipsis to the first sentence only
DBText::Summary only adds ellipsis to the first sentence
Jun 3, 2021
Affected Version
4.8 latest
Description
Looking at the code at https://github.com/silverstripe/silverstripe-framework/blob/4/src/ORM/FieldType/DBText.php#L120, it seems the
$add
is only added to the first sentence if it's longer than$maxWords
.It's not used after line https://github.com/silverstripe/silverstripe-framework/blob/4/src/ORM/FieldType/DBText.php#L144 to append to the second or other sentences.
Steps to Reproduce
Provide a text with two or more sentences and set maxWords to fall in the middle of the second sentence.
The text was updated successfully, but these errors were encountered: