Pending

User tests: Successful: Unsuccessful:

avatar tecpromotion
tecpromotion
5 Oct 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

In build/build-modules-js/utils/compressFile.mjs the Brotli callback did not take the compressed result as argument, but wrote data, which is not defined in that scope. Calling compressFileAndSave() with enableBrotli = true therefore failed with a ReferenceError.

The callback now receives the result, same as the gzip branch above it.

The only caller in core (default-module-builder.mjs) does not enable Brotli, so the regular build is not affected. The bug was introduced with #46879.

Testing Instructions

Run in the root folder of the repository:

echo "console.log('test');" > /tmp/test.min.js
node -e "import('./build/build-modules-js/utils/compressFile.mjs').then((m) => m.compressFileAndSave('/tmp/test.min.js', true)).then(() => console.log('ok'), (e) => console.log(e.name + ': ' + e.message))"

Additionally run npm run build:js to check that the regular build still works.

Actual result BEFORE applying this Pull Request

ReferenceError: data is not defined, no /tmp/test.min.js.br is written.

Expected result AFTER applying this Pull Request

ok, and /tmp/test.min.js.br exists next to /tmp/test.min.js.gz.

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

🤖 Generated with Claude Code

avatar tecpromotion tecpromotion - open - 5 Oct 2026
avatar tecpromotion tecpromotion - change - 5 Oct 2026
Status New ⇒ Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Oct 2026
Category ⇒ JavaScript Repository
avatar brianteeman
brianteeman - comment - 9 Oct 2026

Additionally run npm run build:js to check that the regular build still works.

that doesnt exist in 6.2 it was removed with #46879

avatar brianteeman
brianteeman - comment - 9 Oct 2026

I can confirm the before and after but without knowing what you mean by a "regular build" with a non-existent script means I cant record it as a success

avatar muhme muhme - test_item - 9 Oct 2026 - Tested successfully
avatar muhme
muhme - comment - 9 Oct 2026

I have tested this item ✅ successfully on 6eb90aa

Testing with JBT

  • With node command seen ReferenceError: data is not defined before PR and there is no test.min.js.br file created
  • Applied PR with Patch Tester
    • Node command is running OK and test.min.js.br is created
  • Note: There is no npm run build:js in 6.2-dev anymore
    This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48575.
avatar muhme
muhme - comment - 9 Oct 2026

I have tested this item ✅ successfully on 6eb90aa

Testing with JBT

  • With node command seen ReferenceError: data is not defined before PR and there is no test.min.js.br file created
  • Applied PR with Patch Tester
    • Node command is running OK and test.min.js.br is created
  • Note: There is no npm run build:js in 6.2-dev anymore
    This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48575.

Add a Comment

Login with GitHub to post a comment