Once a user adds a comment to a node, the link to "Add new comment" disappears, and only the option to reply to existing comments remains.
Problem occurs in FF3 mac/lin/win and IE6/7.
Cause:
- as of the D7 version of Garland, comments are displayed through the $comments var in node.tpl.php
- $comments now placed inside "node" div causing it to partially cover the preceding "links" div.
Solution 1: css fix
- in garland/style.css, line 711: change "margin: -1.5em -25px 0;" to "margin: 1.5em -25px 0;"
- patch provided (d7-garland-comment-links.patch)
Solution 2:
- Place $comments outside of the "node" div to avoid the overlap.
- This would also make it consistent with the D6 version again, where comments are rendered outside the "node" div.
- patch provided (d7-garland-comment-links-node-tpl.patch)
I'm providing 2 patches since I'm not sure which solution is prefered. Personally, I prefer the second solution for consistency reasons (with Garland D6) and because I don't like the comments being part of the "node" div.
Both patches tested on FF3 mac/lin/win and IE6/7.
Comment | File | Size | Author |
---|---|---|---|
#15 | d7-garland-comment-links.patch | 494 bytes | quicksketch |
#13 | d7-garland-comment-links.patch | 513 bytes | catch |
#6 | d7-garland-comment-links-node-tpl-2.patch | 516 bytes | jpoesen |
#5 | d7-garland-comment-links-2.patch | 526 bytes | jpoesen |
#2 | d7-garland-comment-links-2.patch | 526 bytes | jpoesen |
Comments
Comment #2
jpoesen CreditAttribution: jpoesen commentedThe original patches weren't created in the drupal root directory.
Re-rolled both.
Comment #3
mr.baileys+1 for resolving this via markup (node.tpl.php). Reviewed the node patch (d7-garland-comment-links-node-tpl-2.patch) and found no problems, applied the patch and works as expected (using FF3 on Win).
Testbot doesn't seem to thrilled about it though (re-test requested to see if this was a fluke)
Comment #4
puradata CreditAttribution: puradata commented+1 for resolving via markup (node.tpl.php)but both patches work fine using ff3 on windows
Comment #5
jpoesen CreditAttribution: jpoesen commentedResubmitting the first patch (d7-garland-comment-links-node-tpl-2.patch) since it's stuck in 're-testing' status.
Comment #6
jpoesen CreditAttribution: jpoesen commentedresubmitting the other patch as well to make testbot happy.
Comment #7
Damien Tournoud CreditAttribution: Damien Tournoud commented- The default node.tpl.php also has the comment inside the node wrapper. I believe that this is the way to go.
- One other issue is that comment-wrapper.tpl.php now always output a
wrapper, even if there are no comments inside, we should fix that too.
- Can you post some screenshots to make clear what the problem is?
Comment #8
Damien Tournoud CreditAttribution: Damien Tournoud commentedComment #9
JohnAlbinSee #372414: comment-wrapper.tpl.php outputs empty div when no comments exist
The CSS solution looks the best to me. Moving the $comment variable is something we could consider in #382870: Update and Polish Node Template Output, but not in this issue.
Comment #11
jpoesen CreditAttribution: jpoesen commentedSince both the default node.tpl.php and garland's node.tpl.php have $comments inside the node wrapper, I agree the css solution looks like the best way to go.
Provided patch http://drupal.org/node/371649#comment-1389974 still works correctly when applied to HEAD.
Re-checked in FF3/Mac, FF3/win, Safari, IE6/7
Comment #12
kjay CreditAttribution: kjay commentedHave reviewed the first patch (applies a CSS repair). The patch applies well and works in FF3.0.10/Mac and Safari 3.2.3/Mac - no IE available just not to check further.
Since I can't see why there needed to be a negative top margin on the #comments block anyway I would say this is the right way to fix this.
Will check again more thoroughly when with a PC
Comment #13
catchRe-attaching the CSS patch - if we want to change markup let's do that in another issue. No credit on commit please, just really hard to know which patch is being referred to which and want the test bot to have chance to check if this still applies.
Comment #15
quicksketchAnother reroll, from the Drupal root.
Comment #16
catchComment #17
webchickCommitted to HEAD. Thanks!
Comment #40
silverwing CreditAttribution: silverwing commentedClosing comments (spam)