Views screen can't be switched to another language in multilingual site due to CSS/JS aggregation of Drupal 10.1

Created on 14 December 2023, 7 months ago
Updated 23 December 2023, 6 months ago

Problem/Motivation

When CSS/JS aggregation enabled, views screen can't be switched to another language after upgrading from 9.5.11 to 10.1.7.
Could you take a look at this?

Steps to reproduce

1.Go to Configuration > Development, turn on "Aggregate CSS files" or "Aggregate JavaScript files".
2.Create an English content and views, create another language (e.g. Japanese) content and views.
3.Show views screen for English contents.
4.In address bar of web browser, replace "en" of language code with other language code (e.g. "ja").
5.The views screen for English contents remains unchanged. (The views screen means the views table and other blocks (e.g. menu bar of superfish).)

Go to Configuration > Development, turn off both of "Aggregate CSS files" and "Aggregate JavaScript files", views screen can be switched to another language successfully.

🐛 Bug report
Status

Postponed: needs info

Version

10.1

Component
Asset library 

Last updated 2 days ago

No maintainer
Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @kubokura
  • 🇮🇳India SandeepSingh199

    Hi @kubokura, I have tried in my local with Drupal 10.1 but not able to replicate. Can you add some screenshots or short video.

  • Status changed to Postponed: needs info 7 months ago
  • 🇳🇱Netherlands Lendude Amsterdam

    And if possible some steps to reproduce this on a clean Drupal install. Just tried this on a clean Umami install and switching from /en to /es and that seems to work fine

  • Thank you for your response. The previous reproduce steps are too rough, sorry for that. Here is detail reproduce steps. (I can't prepare clean install environment of Drupal 10.1 at this moment.)

    Steps to reproduce
    1.Login as a administrator, go to Configuration > Development, turn on "Aggregate CSS files" or "Aggregate JavaScript files".

    2.Go to Content, click Add content, click Basic page, and create two contents.
    - English content
    Title: 2023/12/15 (en)
    Language: English

    - Another language (e.g. Japanese) content
    Title: 2023/12/15 (ja)
    Language: Japanese

    3.Go to Structure > Views, click Add view, and create a view.
    - View name: Basic page list
    - Views settings: Show "Content" of type: "Basic page" sorted by: "Newest first"
    - Page settings:
    -- Create a page: checked
    -- Page title: Basic page list
    -- Path: basic-page-list
    -- Page display settings - Display format: Table
    Save the view.

    4."Basic page list (Content)" page appears, specify Fields and Filter criteria;
    - At Fields, add "Original language" of "Content".
    - At Filter criteria, add "Original language" of "Content", select "Is one of" for Operator, select "Interface text language selected for page" for Language.
    Save "Basic page list (Content)".

    5.Click Translate view tab, add another language (e.g. Japanese).
    "Edit Japanese translation for Basic page list view" appears, specify as follows;
    - Displays > Default Display settings > Basic page list Default display options > Fields
    -- Title Views entity field handler, enter "TAITORU" in "Create a label" field.
    -- Original language Views entity field handler, enter "GENGO" in "Create a label" field.

    6.Go to /en/basic-page-list, "2023/12/15 (en)" appears in the table, and "Title" and "Other language" appears at the table header.
    (See basic-page-list.png.)

    7.In address bar of web browser, replace "en" of language code with other language code (e.g. "ja").

    8."2023/12/15 (en)", "Title" and "Other language" remains.

    Expected behavior
    "2023/12/15 (ja)" appears in the table, and "TAITORU" and "GENGO" appears at the table header.
    (See basic-page-list(expected).png.)

    best regards,

  • Hi, I noticed the symptom also occurred on user profile screen. I'm sorry for informing you lately. Here are the reproduce steps.
    Steps to reproduce
    1.Login as an administrator, go to Configuration > Development, turn on "Aggregate CSS files" or "Aggregate JavaScript files", and logout.
    2.Login as a user, go to user profile screen (go to /en/user/nnn). (See user_profile.png.)
    3.In address bar of web browser, replace "en" of language code with other language code (e.g. "ja").
    4.The English screen remains unchanged.

    Expected behavior
    The other language (e.g. Japanese) screen appears. (See user_profile(expected).png.)

    best regards,

  • 🇨🇦Canada joseph.olstad

    this might have been caused by a bad release of facets_pretty_paths
    I published a new release of facets_pretty_paths that fixes a similar type of problem that is described. There was a regression that was fixed.

  • Hi, @joseph.olstad, thank you for your comment. I'm afraid my website is not using facets_pretty_paths module.
    Hi, @SandeepSingh199, it seems that once CSS/JS cache is created, the symptom will not occur.

    Steps to reproduce
    1.Start web browser (e.g. Chrome, Firefox), login as an administrator, go to Configuration > Development > Performance, turn off "Aggregate CSS files" and "Aggregate JavaScript files" and save configuration in order to clear JS/CSS cache under private/drupal-sites-default/files.

    2.Turn on "Aggregate CSS files" or "Aggregate JavaScript files", save configuration, and logout.

    3.End web browser, restart web browser, login as a user, go to user profile screen (go to /en/user/nnn). (See user_profile.png.)

    4.In address bar of web browser, replace "en" of language code with other language code (e.g. "ja").

    5.The English screen remains unchanged. [reproduced]

    6.End web browser, restart web browser, login as a user, go to user profile screen (go to /en/user/nnn).

    7.In address bar of web browser, replace "en" of language code with other language code (e.g. "ja").

    8.The other language (e.g. Japanese) screen appears. [not reproduced]

Production build 0.69.0 2024