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.
Details: see #1991684: Node history markers (comment & node "new" indicator, "x new comments" links) forces render caching to be per user, particularly the issue summary and comments 40 and 87.
This issue was split off from that issue because the render cache breakage of the Tracker module does not break entity render caching, which is what we were trying to unblock there.
Comment | File | Size | Author |
---|---|---|---|
#19 | tracker_history_markers-2082315-19.patch | 17.74 KB | Wim Leers |
Comments
Comment #1
Wim LeersThis patch was extracted from #1991684: Node history markers (comment & node "new" indicator, "x new comments" links) forces render caching to be per user and depends on code being introduced there (to prevent code duplication, there is a new
drupal.history
library that contains the common code to do history.module-related things).Because this patch depends on that one, marking as postponed because it would otherwise surely fail to work.
Comment #2
Wim Leers#1991684: Node history markers (comment & node "new" indicator, "x new comments" links) forces render caching to be per user was committed, this can now be worked on again.
Comment #3
Wim LeersStraight reroll.
Comment #4
tstoecklerI think this is missing the JS file or was that already committed in the parent patch?
Comment #5
Wim LeersNo, you're right, the JS file is missing. It was in #1, but I failed to include it in #3. Will reroll.
Comment #6
Wim LeersWill be on my plate in 1 week or so hopefully.
Comment #7
realityloop@Wim Leers
I just tried to reroll this myself without any luck (I did include the js from #1), please note the changes to the Tracker module in https://www.drupal.org/node/140363 when you get to rerolling it, feel free to ping me if you need somnoen to review.
Comment #10
realityloophere is my attempt in case it's useful
Comment #11
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #13
Wim LeersComment #14
mrjmd CreditAttribution: mrjmd commentedHere's a reroll. It had some conflicts that I hopefully fixed properly. I also removed the use of deprecated calls to node_load and drupalGetSettings, and removed the @return comment for assertHistoryMetadata() since there is no return.
Comment #16
Wim LeersWe need to get this going again
Comment #17
Wim LeersStarted from #1 again. Notable changes:
ajaxPageState
has been changed, so the test assertions had to be updated also(Rebase interdiff included, but it'll be mostly useless.)
Comment #18
borisson_I have a couple of really small nitpicks but otherwise this seems to work and it has sufficient test coverage as far as I can see.
This comment is not useful. Can this be "Verify that the correct history metadata exists" or something along those lines?
Can it be documented why the sleep is in here? does it have to be?
This comment isn't descriptive either. "Verify that the tracker's dates are updated" or something among those lines would be better I think.
Comment #19
Wim LeersThanks for the review! All addressed.
Comment #20
Fabianx CreditAttribution: Fabianx as a volunteer commentedRTBC - already pre-existing solution, so good to go.
Comment #21
catchI'd expect that the markers in #2082317: Forum history markers ("new" and "updated" markers, "x new posts" links) forces render caching to be per user will end up looking very similar. Is it worth putting this into comment module instead so it can be re-used?
Comment #22
Wim Leers#21: they will indeed be very similar; but that's just because this (Tracker) and the existing code in Comment module (see the
drupal.comment-by-viewer
,drupal.comment-new-indicator
anddrupal.node-new-comments-link
libraries) are already using the same underlying API: History module'sapi
asset library.Tracker module's implementation is different and needs to be different from Comment & Forum's, because it presents data very differently.
If anything, the Forum module's support for this (i.e. in #2082317: Forum history markers ("new" and "updated" markers, "x new posts" links) forces render caching to be per user) would just need the Comment module's existing asset libraries to be refactored so they apply both to comments and forum topics/replies. The Tracker module's needs differ the most from those of Comment/Forum.
Comment #24
catchOK that's fair enough. Committed/pushed to 8.0.x, thanks!