Wrong user displays in list of questions when a comment to an answer was approved
It displays the admin who approved the comment, not the actual commenter. When you go to the actual question and answer, it displays correctly.
How can the grid that displays all the questions display the commenter’s handle instead of the admin who approved?
lisa845jyorg Posted new comment
The content describes a comment display bug: the admin approving a comment is incorrectly shown as the author instead of the actual commenter. The correct commenter is visible within the original question/answer. Frustrating! Need a fix ASAP before misattributed comments cause chaos. Maybe a bit of Wordle Unlimited to destress after finding this bug.
wordle unlimited Answered question
Hello,
You’ll need to change the data source for the handle shown in the grid to point to the actual commenter, not the approver.
Steps:
Find the grid definition in your code or CMS.
Look for the data-binding logic — it may be a SQL query, LINQ, Entity Framework, or just a configuration in the CMS.
Check what user is being referenced for the handle.
Is it pulling ApprovedByUser.Name or ApprovedByUser.Handle?
It should instead pull from CommentedByUser.Name or CreatedByUser.Name.
Modify the query or field binding.
Example in pseudo-code:
SELECT Comments.Content,
Users.Handle AS CommenterHandle,
Admins.Name AS ApprovedBy
FROM Comments
JOIN Users ON Comments.CreatedByUserId = Users.Id
LEFT JOIN Admins ON Comments.ApprovedByUserId = Admins.Id
Update the grid to use CommenterHandle instead of ApprovedBy.