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.
Currently the rdf.module hook_preprocess_node()
implementation renders the added metadata using drupal_render() and other modules are not be able to alter this metadata.
Since we are using twig to print this variable, removing the call to drupal_render() does not have any effect on existing sites.
Comment | File | Size | Author |
---|---|---|---|
#15 | rdf.module-do_not_render_metadata-2819695-15-D8.patch | 690 bytes | SchnWalter |
Comments
Comment #2
SchnWalter CreditAttribution: SchnWalter as a volunteer and commentedComment #6
SchnWalter CreditAttribution: SchnWalter as a volunteer and commentedComment #7
swentel CreditAttribution: swentel as a volunteer commentedYes please, been bitten by this at the moment.
It's a trivial fix, and helps people who want to alter the metadata element in a later preprocess function.
Comment #8
alexpottThis is a good change but I can conceive of sites with workarounds - i.e. a find and replace on the string. As per https://www.drupal.org/core/d8-bc-policy variables passed to preprocess are allowed to change. But I do think we should have a change record to inform themers that this variable is changing from a string to a render array.
Comment #9
swentel CreditAttribution: swentel as a volunteer commentedRight, makes sense, I'll make a change record over the weekend, I have example code to account for both use cases.
Comment #10
swentel CreditAttribution: swentel as a volunteer commentedChange record at https://www.drupal.org/node/2959337
Comment #11
borisson_The change record is very detailed and doesn't seem to miss any information. Since that was the only thing missing in #8, this can go back to RTBC.
Comment #12
alexpottI'm sorry that i missed this before but i think it's worth adding a test so we don't regress.
Comment #15
SchnWalter CreditAttribution: SchnWalter as a volunteer and commentedRe-rolling patch against 8.8.x
Comment #22
smustgrave CreditAttribution: smustgrave at Mobomo commentedThis appears to possibly still be valid.
FYI RDF is being moved to https://www.drupal.org/project/rdf and out of core so moving the ticket over there.
Comment #23
smustgrave CreditAttribution: smustgrave at Mobomo commentedWondering if this is still an issue as the issue appears to be in the
rdf_preprocess_comment
not node.Comment #24
smustgrave CreditAttribution: smustgrave at Mobomo commentedIf still a valid issue please reopen