Wrong user displays in list of questions when a comment to an answer was approved

5.03K viewsIssuescomments
0

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?

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. HCTRA

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.

0

That’s a tricky issue! It sounds like the system is prioritizing the approval process over the actual user contribution. One workaround might be to explore custom field options or database modifications. I remember spending hours tinkering with similar display issues on a forum years ago – almost as much time as I’ve spent enjoying Snow Rider 3D lately! Good luck debugging this. Hopefully you find a solution soon!

Answered question
You are viewing 1 out of 5 answers, click here to view all answers.