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.
For some reason, the comments pane manually calls node_tag_new to mark the node as viewed, but that's not viewing the node, just the comments.
If using separate comment and comment form pane, and the comment form comes /after/ comments pane:
1) comment form submission
2) comments rendered, node marked as viewed using request time
3) comment form rendered, comment submission processed using request time
4) page redirect
expected: new comments appear as new
actual: new comments appear as read because the node was marked as viewed
Comment | File | Size | Author |
---|---|---|---|
#2 | 2555469-ctools-comments-node_tag_new-2.patch | 588 bytes | hefox |
Comments
Comment #2
hefox CreditAttribution: hefox at Phase2 commentedComment #3
mpotter CreditAttribution: mpotter commentedAny review of this? This happens in Atrium because we are using Panels to separate the comment form from the comment list and it messes with the new/updated tags on the comments. This patch seems to fix it for us, so marking as RTBC but other opinions are welcome.
Comment #4
rivimeyThe code looks ok, and I can see the logic of this change.
Is there any chance that -- even in a non-Atrium setup - this change will mean that when the node content really is rendered it is not marked as read? That is, is the patch here removing code that could be considered redundant?
Any chance of adding some tests in this area?
Comment #5
rivimeyComment #8
japerryHmm so I looked at the history -- it does appear this part of the functionality was just added when ctools was created for d7 in 2009. There is a followup issue, #945360: node_tag_new() called with the wrong argument that tackles the wrong argument.. but thats it.
I think this is safe to remove, since if you're embedding a node with a comment, the node view should trigger there anyway.
Committed!