pegasus
Well-known member
- Affected version
- 2.2.7
Somewhat related to: https://xenforo.com/community/threa...ge_macros-itemprop-name-appears-twice.194844/
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).
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).