No Code Attached Yet
avatar paternax
paternax
2 Oct 2024

Steps to reproduce the issue

Image

Display Options -> Introtext Limit - set it to 5

Expected result

The introtext should be cut after 5 characters, followed by the three points

Actual result

Although there is introtext, in some cases no characters are shown

Image

System information (as much as possible)

Joomla 5.2rc1, PHP 8.2

Additional comments

There is HTML Text in front of the text

avatar paternax paternax - open - 2 Oct 2024
avatar joomla-cms-bot joomla-cms-bot - change - 2 Oct 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 2 Oct 2024
avatar bembelimen bembelimen - change - 2 Oct 2024
Labels Added: Release Blocker
avatar bembelimen bembelimen - labeled - 2 Oct 2024
avatar bembelimen
bembelimen - comment - 2 Oct 2024

If I do:
Image

I get:
Image

So more characters than expected.

avatar Quy Quy - change - 2 Oct 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-10-02 20:12:20
Closed_By Quy
avatar Quy Quy - close - 2 Oct 2024
avatar Quy Quy - change - 2 Oct 2024
Status Closed New
Closed_Date 2024-10-02 20:12:20
Closed_By Quy
avatar Quy Quy - reopen - 2 Oct 2024
avatar Quy
Quy - comment - 2 Oct 2024

Partial fix per #44179 except for ....

avatar chmst
chmst - comment - 3 Oct 2024

One problem arises when the text limit ist too small. Then the truncate method cannot find a space in the text and offset is empty. No text is displayed at all.

If the limit for the introtext is big enough so that at least one space is in the truncated text, then it works. Not the exact number of characters, but near enough for human reading.
A quick solution could be:
Add a description to the label of text-limit that the number is not exact value but varies with spaces between words.
Add a rule that the text-limit must be >= 50 then probably every language has at least one space in the text. In real life it does not make sense to show only 6 characters of an intro text.

avatar brianteeman
brianteeman - comment - 4 Oct 2024

Does the readmore limit behave differently here to its other uses elsewhere? I suspect not

avatar Quy Quy - change - 4 Oct 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-10-04 13:09:07
Closed_By Quy
avatar Quy Quy - close - 4 Oct 2024
avatar Quy
Quy - comment - 4 Oct 2024

Please test PR #44189. Thanks for the report.

avatar chmst
chmst - comment - 4 Oct 2024

Does the readmore limit behave differently here to its other uses elsewhere? I suspect not

It is the same method, probably in real life nobody sets limit so small as we did in these tests. I can test tomorrow with readmore in other situations.

avatar richard67 richard67 - change - 8 Oct 2024
Labels Removed: Release Blocker
avatar richard67 richard67 - unlabeled - 8 Oct 2024

Add a Comment

Login with GitHub to post a comment