Naming js translation files with _0, _1, _2 etc.

Created on 30 March 2023, over 2 years ago
Updated 31 March 2023, over 2 years ago

Problem/Motivation

I guess, I caught the bug with the naming of js translation files in sites/default/files/languages/*.js in my case I see base64_hash_0.js, base64_hash_1.js, etc.

Steps to reproduce

Perhaps when a few users open the page after cleaning the cache, they both try to generate the same file for js translations.

Proposed resolution

Use FileSystemInterface::EXISTS_REPLACE in _locale_rebuild_js for rewriting the file on creating.
Not to create new with numbers in the end provided by FileSystemInterface::EXISTS_RENAME.

πŸ› Bug report
Status

Needs work

Version

9.5

Component
LocaleΒ  β†’

Last updated 4 days ago

Created by

πŸ‡΅πŸ‡±Poland artemboiko

Live updates comments and jobs are added and updated live.
  • 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

Production build 0.71.5 2024