Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
rdf_preprocess_username() makes sure the name of a user is output as a string without language:
// Because lang is set on the HTML element that wraps the page, the
// username inherits this language attribute. However, since the username
// might not be transliterated to the same language that the content is in,
// we do not want it to inherit the language attribute, so we set the
// attribute to an empty string.
This function isn't used on user profile page, instead rdf_preprocess_user() is used, but it doesn't include this language stripping.
Proposed resolution
Add same functionality of rdf_preprocess_username() in rdf_preprocess_user() so the RDF outputs match.
This issue will also include tests for user output, split from #1869914: Refactor RdfMappingDefinitionTestCase and split it in dedicated test cases.
Comment | File | Size | Author |
---|---|---|---|
#2 | 1895064-UserAttributesTest-2.patch | 4.97 KB | scor |
#1 | 1895064-UserAttributesTest-1.patch | 4.67 KB | scor |
Comments
Comment #1
scor CreditAttribution: scor commentedComment #2
scor CreditAttribution: scor commentedadded a bit more documentation in rdf_preprocess_user()
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedGood catch. This looks good to me.
Comment #4
Dries CreditAttribution: Dries commentedCommitted to 8.x. Thanks.