Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magento 2.4.4 JS-minification does not work "unexpected token const" #35366

Closed
1 task
antonfries opened this issue Apr 25, 2022 · 12 comments
Closed
1 task

Magento 2.4.4 JS-minification does not work "unexpected token const" #35366

antonfries opened this issue Apr 25, 2022 · 12 comments
Assignees
Labels
duplicate Issue: ready for confirmation Reported on 2.4.4 Indicates original Magento version for the Issue report.

Comments

@antonfries
Copy link

Preconditions (*)

  1. Magento 2.4.4

Steps to reproduce (*)

  1. Enable js-minification (Path dev/js/minify_files)
  2. Enable production mode
  3. Login into admin console, review javascript console for js errors

Expected result (*)

No javascript errors

Actual result (*)

2022-04-25_12h34_52
2022-04-25_12h35_03
If enabling dev/js/enable_js_bundling too, toggling menus in backend is not possible anymore (this is, how we discovered the bug):
2022-04-25_13h39_23

  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
@m2-assistant
Copy link

m2-assistant bot commented Apr 25, 2022

Hi @antonfries. Thank you for your report.
To speed up processing of this issue, make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@m2-assistant
Copy link

m2-assistant bot commented Apr 25, 2022

Hi @engcom-November. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-November
Copy link
Contributor

Hi @antonfries ,
Thank you for reporting and collaboration. However this issue is a duplicate of #35325. We are closing this issue. Please move on to this ticket for latest updates/solutions.
Thank you.

@m2-community-project m2-community-project bot removed this from Ready for Confirmation in Issue Confirmation and Triage Board Apr 25, 2022
@engcom-November engcom-November added duplicate Reported on 2.4.4 Indicates original Magento version for the Issue report. labels Apr 25, 2022
@ssx
Copy link
Contributor

ssx commented May 24, 2022

Patch: https://gist.github.com/ssx/275bc6c9674277ed8d26592235f1cc6b

@writyou
Copy link

writyou commented Jun 4, 2022

There is still this problem, the admin menu does not work, in production mode

@steveberrill
Copy link

Same, still error in production

@kevinvuilleminskazy
Copy link

Same for me. patch no working

@davidduong90
Copy link

Same for me. patch no working

Do you try to upgrade, deploy and flush cache?

@davidandersson1
Copy link

@ssx if you any idea, can you please tell me, how to apply this patch via composer.json??
https://gist.github.com/ssx/275bc6c9674277ed8d26592235f1cc6b

For example, if specific module patch then we can apply like
"extra": {
"magento-force": "override",
"composer-exit-on-patch-failure": true,
"patches": {
"magento/module-cache-invalidate": {
"GH 8815: Varnish purge requests can overrun size limit": "patches/composer/github-issue-8815.patch"
},
}
}

but here patch we have to apply inside lib directory so not getting me what could be the module name at place of "magento/module-cache-invalidate".

if anybody know, please help!

Thanks,
David

@writyou
Copy link

writyou commented Sep 22, 2022

After magento2.4.5 js is compressed, the production mode, the product cannot be saved, and the cms article cannot be saved

@antonfries
Copy link
Author

@ssx if you any idea, can you please tell me, how to apply this patch via composer.json?? https://gist.github.com/ssx/275bc6c9674277ed8d26592235f1cc6b

For example, if specific module patch then we can apply like "extra": { "magento-force": "override", "composer-exit-on-patch-failure": true, "patches": { "magento/module-cache-invalidate": { "GH 8815: Varnish purge requests can overrun size limit": "patches/composer/github-issue-8815.patch" }, } }

but here patch we have to apply inside lib directory so not getting me what could be the module name at place of "magento/module-cache-invalidate".

if anybody know, please help!

Thanks, David

You have to use "magento/magento2-base" - after composer update/install the files getting copied to main directory, if missing

@davidandersson1
Copy link

@antonfries thanks a lot for your reply and it's works perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issue: ready for confirmation Reported on 2.4.4 Indicates original Magento version for the Issue report.
Projects
None yet
Development

No branches or pull requests

8 participants