No Code Attached Yet bug
avatar lushdomain
lushdomain
29 Jun 2025

Steps to reproduce the issue

None, happens right out of the box.

I've just noticed this little quirk with the new Articles module in J5. I assume it is the ellipsis for the shortened article intro, but instead of being at the end of the text as expected. It seems to have been orphaned outside of the

!

Expected result

Integer at diam ac nibh viverra vestibulum...

Actual result

Integer at diam ac nibh viverra vestibulum.

...

System information (as much as possible)

J5.3.1

Additional comments

The issue is in the modules helper.php Line 390

if ($introtextlimit != 0) {
$item->displayIntrotext = HTMLHelper::('string.truncateComplex', $item->displayIntrotext, $introtext_limit);
}

Now, I know you will hate it, but apparently this is a known issue with Joomla's truncateComplex function - it can break HTML structure when determining where to place the ellipsis.

This version from Claude, replacing the above solved the issue:

if ($introtext_limit != 0) {
$plainText = strip_tags($item->displayIntrotext);
if (strlen($plainText) > $introtext_limit) {
$truncated = substr($plainText, 0, $introtext_limit);
$item->displayIntrotext = '

' . $truncated . '...

';
}
}

I'm sure there is a better way, a Joomla way. But it proved a point.

avatar lushdomain lushdomain - open - 29 Jun 2025
avatar joomla-cms-bot joomla-cms-bot - change - 29 Jun 2025
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 29 Jun 2025
avatar lushdomain
lushdomain - comment - 29 Jun 2025

Steps to reproduce the issue

None, happens right out of the box.

I've just noticed this little quirk with the new Articles module in J5. I assume it is the ellipsis for the shortened article intro, but instead of being at the end of the text as expected. It seems to have been orphaned outside of the </p>!

Expected result

Integer at diam ac nibh viverra vestibulum...</p>

Actual result

Integer at diam ac nibh viverra vestibulum.</p>...

<p class="readmore tck-readmore">

System information (as much as possible)

J5.3.1

Additional comments

The issue is in the modules helper.php Line 390

if ($introtextlimit != 0) {
                    $item->displayIntrotext = HTMLHelper::('string.truncateComplex', $item->displayIntrotext, $introtext_limit);
                }

Now, I know you will hate it, but apparently this is a known issue with Joomla's truncateComplex function - it can break HTML structure when determining where to place the ellipsis.

This version from Claude, replacing the above solved the issue:

if ($introtext_limit != 0) {
    $plainText = strip_tags($item->displayIntrotext);
    if (strlen($plainText) > $introtext_limit) {
        $truncated = substr($plainText, 0, $introtext_limit);
        $item->displayIntrotext = '<p>' . $truncated . '...</p>';
    }
}

I'm sure there is a better way, a Joomla way. But it proved a point.

avatar brianteeman
brianteeman - comment - 1 Jul 2025

I cant find the class tck-readmore anywhere in the codebase

avatar lushdomain
lushdomain - comment - 1 Jul 2025

tck-readmore is not Joomla. It's from Ced's Template Creator. But this is happening in the Joomla Articles module that truncates the text from an article.

avatar brianteeman
brianteeman - comment - 2 Jul 2025

Bug confirmed

avatar QuyTon QuyTon - change - 2 Jul 2025
Labels Added: bug
avatar QuyTon QuyTon - labeled - 2 Jul 2025
avatar brianteeman
brianteeman - comment - 3 Jul 2025

see #45678

avatar alikon alikon - close - 3 Jul 2025
avatar alikon
alikon - comment - 3 Jul 2025

please test #45678

avatar alikon alikon - change - 3 Jul 2025
Status New Closed
Closed_Date 0000-00-00 00:00:00 2025-07-03 12:37:41
Closed_By alikon

Add a Comment

Login with GitHub to post a comment