PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar iteidrm
iteidrm
22 Apr 2026

Pull Request resolves # .

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

There is a bug in the "order" languages are loaded and cached in com_modules in combination with certain field layouts that are rendered in the backend when creating or editing a module. Here, different methods to load the respective language are used where one overrides the other.

Debug Language set to "On" masks the bug because it skips the preload.

When selecting an alternative layout provided by a site template (override) for a module, the layout dropdown renders labels in en-GB instead of the admin's current language. If no translation exists, of course the filename would be displayed.

A practical / real life scenario would be, if you created a custom site template and ship that with an override for, let's say: mod_articles. This override introduces a new layout called: fancy-with-sugar-on-top.php

The corresponding language string for that layout would then be:
TPL_YOURTEMPLATE_MOD_ARTICLES_LAYOUT_FANCY-WITH-SUGAR-ON-TOP="Fancy article layout with sugar on top"

Testing Instructions

Download and install the demo template tpl_acme.zip. It has got a custom layout for mod_articles called: translateme.php. The template / style does not have to be activated.

I've included language files for en, es and de to test this with. Now, set the backend language either to Spanish or German, given you installed one of these first.

Create a new module instance of mod_articles and switch over to the Advanced Tab -> Layout. The dropdown should list all available overrides / layouts grouped by template + the default option.

Thanks to @joomdonation for proposing a better solution than my previous attempt.

Actual result BEFORE applying this Pull Request

Regardless of the selected backend language, the en-GB version of the translation is used.

Expected result AFTER applying this Pull Request

The drowdown shows the translation currently selected as the default.

Link to documentations

Please select:

  • Documentation link for guide.joomla.org: n/a

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org: n/a

  • No documentation changes for manual.joomla.org needed

avatar iteidrm iteidrm - open - 22 Apr 2026
avatar iteidrm iteidrm - change - 22 Apr 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Apr 2026
Category Administration com_modules
avatar iteidrm iteidrm - change - 22 Apr 2026
Labels Added: PR-5.4-dev
avatar iteidrm iteidrm - change - 22 Apr 2026
Title
Enable default-language preload to prevent overwrite on subsequent loads
Enable default-language preload in com_modules to prevent overwrite on subsequent loads
avatar iteidrm iteidrm - edited - 22 Apr 2026
avatar iteidrm iteidrm - change - 23 Apr 2026
The description was changed
avatar iteidrm iteidrm - edited - 23 Apr 2026

Add a Comment

Login with GitHub to post a comment