Skip to content

Content Management System (CMS) language fallbacks are inconsistent #5339

@tdonohue

Description

@tdonohue

Describe the bug

Discovered via testing of #5106.

When using the new Content Management System (CMS) features, there are different (and inconsistent) fallbacks for End User Agreement and Header/Footer/News.

For example, if you only provide custom English language text for the End User Agreement, then change the language to German, the fallback is to use the custom English text. However, if you only provide custom English language text for the Header/Footer/News, then change the language to German, the fallback is to not display a custom Header/Footer/News section.

I feel the better behavior is the former. We should fallback to using English (or default language) if custom text is not provided for another language.

To Reproduce

Steps to reproduce the behavior:

  1. Modify the End User Agreement from the Admin UI. Only add a custom English text version.
  2. Verify the English language version is displayed if you open the End User Agreement from the footer link.
  3. Now, change your selected language to Deutsch (German). Revisit the End User Agreement and notice you will still see the English version.
  4. Modify the Homepage Header (or Footer) from the Admin UI. Only add a custom English text version.
  5. Verify the English language version is displayed in the Homepage header.
  6. Now, change your selected language to Deutsch (German). Revisit the homepage and notice the custom header is no longer displayed. (This is because there is no fallback to use the English version and instead it falls back to an empty Header because no German version has been provided.)

Workaround: As long as you always translate all custom CMS fields to all enabled languages (in your config.*.yml), then you will not encounter this bug.

Expected behavior

I feel the best fallback option is to display the custom text of the default language (like is done for the End User Agreement)

Related work

Issue was found in testing of #5106

Metadata

Metadata

Labels

DSpace-CRIS mergerThis ticket/PR relates to the merger of DSpace-CRIS into DSpace.bugclaimed: 4Science4Science team is working on this issue & will contribute backhelp wantedNeeds a volunteer to claim to move forward

Type

Projects

Status

🏗 In Progress

Status

📋 To Do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions