Fixed Rogue itemprop="name" from fnUsernameLink


Well-known member
Affected version
Somewhat related to:

Basically, we have rogue itemprop="name" values coming from anywhere that uses fnUsernameLink(). If a username link is templated outside an itemscope, or in an itemscope that already has its own "name", fnUsernameLink() throws in an itemprop="name" that we don't need, because it's hardcoded. Sometimes we just want the username link, without it changing the name on our other structured data.

The appropriate design is for fnUsernameLink() NOT to hardcode itemprop="name". If we need/want it for a particular context, we should explicitly pass it as an extra attribute (message_macros should be reverted to the pre-2.2.6 version).

If you need an example of vanilla XenForo with rogue itemprop="name", check out the usernames in the Last Post column on the main forums list on this site. None of those are in an itemscope. Luckily the main forums list has JSON-LD that takes precedence. But some pages may not be so lucky (I have some add-ons that aren't).

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.8).

Change log:
Remove itemprop attribute from the fnUsernameLink templater function
There may be a delay before changes are rolled out to the XenForo Community.