Needs work
Project:
Drupal core
Version:
main
Component:
comment.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 Sep 2015 at 21:46 UTC
Updated:
24 Apr 2023 at 22:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #4
olli commentedRebased and fixed TrackerUserUidTest.
I'm not sure if it is possible to remove this->database from the query() method but I think user->getUsername() is better than a db query.
Comment #16
smustgrave commentedComment #17
medha kumariRerolled the patch #4 in Drupal 9.5.x.
Comment #18
medha kumariRerolled patch #17 in Drupal 9.5.x. and fixed custom command failed
Comment #20
medha kumariFixing Error in #18
Comment #21
akram khanFix CCF #20
Comment #23
Ankit.Gupta commentedComment #24
spokjeComment #26
smustgrave commentedThis issue is being reviewed by the kind folks in Slack, #need-reveiw-queue. We are working to keep the size of Needs Review queue [2700+ issues] to around 200, following Review a patch or merge require as a guide.
Thank you @Spokje for fixing up that patch.
Change looks good to me and see it passes 9.5, 10.0, and 10.1 (so much green!)
Comment #27
quietone commentedI talked to larowlan about this and we agree that this can use the null safe operator.
$title = $user?->getDisplayName();.Also, this is a 10.1.x only change. Therefor I have changed the version.
This is suitable for a novice, adding tag.
Comment #30
spokjeComment #31
smustgrave commentedOnly open thread
You mentioned it may not be worth the effort and for a small change that path would require a change record, trigger_error (I would imagine), and then tests.
Just my thought.
Comment #32
alexpottThis is actually a bug fix as it is correctly changing the title from the user's account to the display name.
I wonder what this change means for argument's summary name field... in UserViewsData we do:
But now this argument is using the display name which might have nothing to do with account name. I think we need to address this inconsistency if we change to display name here. FWIW off the top of my head I have no idea what summary queries do :)
Comment #34
sahil.goyal commentedUpdated the plugin to use dependency injection for the entity-type manager instead of the global singleton
\Drupal\user\Entity\User::load(). Instantiate the plugin with the entity-type manager, and modified the execute() method to load the user entity using the injected entity-type manager.Comment #35
sahil.goyal commentedComment #36
smustgrave commentedNow I believe this will need to default to NULL and trigger_error when the Entity Type Manager isn't passed in.
Should have test coverage I believe too.
#32 still needs an answer also.