User views - user links are not localized

Created on 7 October 2015, about 9 years ago
Updated 23 January 2024, 10 months ago

Problem/Motivation

- Install with Standard profile in English.
- Turn on the 4 multilingual modules.
- Add Spanish language.
- Make User content translatable, including the Picture image file (the file is not checked by default, but there's not much else you can translate, so turn this on so you can see which item is which in views).
- Add a Picture file to user 1.
- Translate user 1 into Spanish, uploading a different Picture file.

Now make a view of Users, showing fields. Include the picture file field.

The output has 2 rows (the translations) as it should, with the 2 different picture files. However, unlike views of Nodes and Taxonomy terms, the user names in both cases link to user/1 and one of them should be linking to es/user/1 so that if you go to the page you get that translation.

Proposed resolution

Fix the user name formatter so that it links to the correct translation of the user page. Test it.

Remaining tasks

Make a patch.

User interface changes

User views displaying links to user names will behave like other entity views, and link to the localized page.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
User moduleΒ  β†’

Last updated about 9 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States jhodgdon Spokane, WA, USA

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.

Sign in to follow issues

Comments & Activities

Not all content is available!

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

  • First commit to issue fork.
Production build 0.71.5 2024