User tests: Successful: Unsuccessful:
Pull Request resolves #47710.
PR #47263 fixed readmore showing when there is nothing to read, but introduced a regression: when introtext_limit is used to truncate text (instead of a readmore marker), $item->fulltext is empty so the readmore button never renders even though the article IS truncated and there IS more to read.
Fix tracks whether truncation actually occurred and uses that flag alongside $item->fulltext to decide readmore visibility.
No readmore button shown even though text is truncated by introtext_limit
Readmore button appears when introtext is truncated. Does not appear when text fits within limit. Articles using readmore marker unaffected.
| Status | New | ⇒ | Pending |
| Category | ⇒ | Modules Front End |
@richard67 Thanks for flagging #47713.
Our approach differs in a key way: #47713 has an open review comment from @QuyTon noting the fix executes even when show_introtext is disabled.
In this PR, $item->introTextTruncated is initialized to false in the helper and only set to true inside the if ($show_introtext) block — so the template condition is always safe when intro text display is off. This addresses QuyTon's concern.
Happy to close if maintainers prefer to update #47713 instead.
I have tested this item ✅ successfully on 5621400
Thanks.
I have tested this item ✅ successfully on 5621400
Thanks.
@richard67 — adding to my earlier response:
@krishnagandhicode has independently tested and confirmed this PR works correctly on 5621400.
To summarise why this PR addresses the regression more completely than #47713:
show_introtext is disabled$item->introTextTruncated is initialised to false before the if ($show_introtext) block and is only set true inside it — so when intro text display is off, the flag stays false and the readmore condition is unaffectedWith a passing test and CI green, happy to have this reviewed for merge or to close in favour of a corrected #47713 — whichever the team prefers.
@richard67 — adding to my earlier response:
@krishnagandhicode has independently tested and confirmed this PR works correctly on 5621400.
To summarise why this PR addresses the regression more completely than #47713:
show_introtext is disabled$item->introTextTruncated is initialised to false before the if ($show_introtext) block and is only set true inside it - so when intro text display is off, the flag stays false and the readmore condition is unaffectedWith a passing test and CI green, happy to have this reviewed for merge or to close in favour of a corrected #47713 - whichever the team prefers.
There is already a PR for the same issue: #47713 .