Use AccountInterface::getDisplayName() for RSS feeds in Views

Created on 28 February 2012, almost 13 years ago
Updated 26 September 2024, 4 months ago

I have the realname module installed on my site to display authors by their realname instead of username. But this is not working for the feed I created in views. The XML generated has the username for the creator for each article. For example:
<dc:creator>daviser</dc:creator>

The creator is set in modules/node/views_plugin_row_node_rss.inc
I found that if I change this

      'key' => 'dc:creator',
        'value' => $node->name,

to

        'key' => 'dc:creator',
        'value' => format_username($node),

then the realname is used for the creator.

<dc:creator>Ellen Davis</dc:creator>

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component

views.module

Created by

🇺🇸United States ellen.davis

Live updates comments and jobs are added and updated live.
  • VDC

    Related to the Views in Drupal Core initiative.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024