Fixing UE4 Marketplace Comment Usernames Being Unknown
Today I was looking at the customer comments for my marketplace assets on the Unreal Engine Marketplace and found that across the entire site, usernames were being reported as "Unknown".
I've written previously about some of my experiments with the Marketplace JS API and using Fiddler to do some editing. Fiddler proves forever useful here as well.
I isolated a bug to two sections of Epic's
store.epic-store-frontend.js that are served to everyone after being web packed and minified. They are identifiable by the string
"messages.com.epicgames.plugin.commentrating.comments.deleted_user" which is a localized string that indicated a user's account has been deleted when reading their comments.
It turns out that a bug was written where if a user deleted their account, it would show an appropriate message, however if a user did not delete their account, it would overwrite a comment's username with the string "Unknown". This appears as if handling deleted users is a relatively new feature and when it was written, the state of having a username accidentally became mishandled.
"e.accountDisplayName = "Unknown" from the identified code blocks was enough to restore usernames; although I'm sure this quick edit does not handle all of the situations Epic intends.
Bonus: If anyone is curious what information is available in a Marketplace Comment: