Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Comment indentation fails to close div tags if
(a) indentation depth > 2 and
(b) indentation depth decrements more than one level at once.
Comment | File | Size | Author |
---|---|---|---|
#5 | patch_72.txt | 991 bytes | webernet |
#3 | patch_71.txt | 796 bytes | webernet |
fix-indentation.patch.txt | 801 bytes | leflo |
Comments
Comment #1
leflo CreditAttribution: leflo commentedComment #2
webernet CreditAttribution: webernet commentedThere does appear to be a vaild bug here. Adjacent comments in the nested list only differ by one level.
Unfortunately patch doesn't apply.
Comment #3
webernet CreditAttribution: webernet commentedCurrently, if a comment is indented, the next comment in the threaded list appears to be at most 1 level higher, even if it should be a top-level comment.
Currently it looks like this:
Comment 1
-Comment 1.1
--Comment 1.1.1
--Comment 1.1.2
-Comment 2
Should be:
Comment 1
-Comment 1.1
--Comment 1.1.1
--Comment 1.1.2
Comment 2
Patch seems to fix the issue, not sure if it's the right/best approach though.
Comment #4
merlinofchaos CreditAttribution: merlinofchaos commentedI think this patch looks good. I was thinking that isnce the while loop decrements $last_depth setting it immediately after is unnecessary, but that while loop does not always run and the last_depth needs to be set. It may be that the $last_depth = $comment->depth should be moved to just before the else.
Comment #5
webernet CreditAttribution: webernet commentedHere's a revised patch.
Comment #6
Steven CreditAttribution: Steven commentedCommitted to HEAD, thanks.
Comment #7
webernet CreditAttribution: webernet commentedComment #8
(not verified) CreditAttribution: commented