"Replied to" comments content displayed with broken layout (vertical/horizontal)
- Status
- Open
- Subject
- "Replied to" comments content displayed with broken layout (vertical/horizontal)
- Version
- 27.x
- Category
- Regression
- Feature
- Comment
- Resolution status
- Fix on the Way
- Submitted by
- Marc Laporte
- Lastmod by
- Philippe Cloutier
- Rating
- Description
Tiki 25 introduced an optional limit on comment indentation, so that replies to comments of level 5 or above are not more indented than their parents (for example, a reply to a reply to a reply to a reply to a reply to a reply to a root comment would only have 5 levels of indentation). In order to keep indicating threading (which is a comment's parent) even in these comments which reach the indentation limit, an excerpt of that parent's text was added.
Although the initial implementation was incorrect, it got much worse in Tiki 27. While the excerpt used to be the first 15 characters of the markup (source), it has now become the first 15 characters of the output (HTML) (reportedly to fix a bug for Markdown).
Unfortunately, such a truncation is completely unsafe, and visibly breaks most of the time (although this may depend on the paragraph parsing preferences). Although this can cause all sorts of broken HTML and resulting weirdness, the typical effect is that truncation happens inside a paragraph, leaving a missing </p> tag, which causes browsers to ignore the closing </span> tag, effectively treating the reply itself as a part of the parent comment since the DOM's span contains too much.
Moreover, in November there was a puzzling attempt to fix this which moved the problem, making this way worse for Tiki 27.1. Now, instead of just breaking rare (highly nested) replies:- level 1 comments display an irrelevant excerpt
- level 1 comments are therefore frequently broken
- level 5+ comments are missing an excerpt (but are therefore no longer badly broken).
Screenshot taken from https://dev.tiki.org/item7838-Installer-not-ready-for-PHP-7-4-in-Tiki-18-x- Files
- Solution
Multiple solutions are possible:
- Stop truncating the excerpt
- Go back to displaying the markup instead of parsing
- Truncating the output in a much more smart and involved way (done for 27.2 by amani nyumu)
- Stop displaying the excerpt
- Indicate the parent without resorting to an except. There is already some work done for that (the parent's author is indicated). Adding a timestamp would be good, and a link too would make it clearly sufficient.
- Find some other way to represent unlimited depth (which does not rely on a hard limit)
- Workaround
- The excerpt can be removed by commenting the 5 problematic lines (if/span at 26 to 30) in the problematic file, templates/comment/list_inner.tpl.
- Importance
- 7
- Easy to solve?
- 7
- Priority
- 49
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 8714
- Created
- Sunday 13 October, 2024 16:24:56 UTC
by Marc Laporte - LastModif
- Wednesday 22 January, 2025 02:28:44 UTC