Open git-seb opened 2 years ago
Hi @git-seb. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:
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.
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: 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.
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
@magento give me 2.4-develop instance
Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Hotel, here is your Magento Instance: https://3799947449e4bad23f91dcee07ec26fe.instances.magento-community.engineering Admin access: https://3799947449e4bad23f91dcee07ec26fe.instances.magento-community.engineering/admin_7b3e Login: 7aac3ab7 Password: e741a5337917
@magento give me 2.4-develop instance
Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Hotel, here is your Magento Instance: https://3799947449e4bad23f91dcee07ec26fe.instances.magento-community.engineering Admin access: https://3799947449e4bad23f91dcee07ec26fe.instances.magento-community.engineering/admin_0eff Login: fe47182a Password: d6b2666ed978
@magento give me 2.4.5 instance
Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Hotel, here is your Magento Instance: https://22dcddfc581ace05c5c80fae5246308c.instances.magento-community.engineering Admin access: https://22dcddfc581ace05c5c80fae5246308c.instances.magento-community.engineering/admin_679b Login: 68411098 Password: ea9b240a04e1
Hi @git-seb
We have tried to reproduce this issue
Precondition:
• Magento 2.4-develop
&& 2.4.5
• PHP 8.1
We have followed below steps 1.We have enabled Minify JavaScript Files as shown below
2.After we run the frontend url in Google PageSpeed
Please let us know if we are missing any steps here.
Thanks
Hi @engcom-Lima,
as you can see on your last screenshot, Google says jquery.validate.min.js can be optimized even though it is stated as passed. If you check that file you can see it is not minified correctly (see link https://22dcddfc581ace05c5c80fae5246308c.instances.magento-community.engineering/static/version1661761332/frontend/Magento/luma/en_US/jquery/jquery.validate.min.js from your instance).
Thanks.
@magento give me 2.4-develop instance
Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Hotel, here is your Magento Instance: https://3799947449e4bad23f91dcee07ec26fe.instances.magento-community.engineering Admin access: https://3799947449e4bad23f91dcee07ec26fe.instances.magento-community.engineering/admin_eaf4 Login: 58a40937 Password: 938d907076e8
@magento give me 2.4.5 instance
Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Hotel, here is your Magento Instance: https://22dcddfc581ace05c5c80fae5246308c.instances.magento-community.engineering Admin access: https://22dcddfc581ace05c5c80fae5246308c.instances.magento-community.engineering/admin_f3f8 Login: 355e5f29 Password: eec8a16061e0
@magento give me 2.4.4 instance
Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Hotel, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.
:heavy_check_mark: Issue confirmed
Issue got reproduced in 2.4-develop && 2.4.5 branch.
Description: After enabling the Minify JavaScript Files in magento, the jquery.validate.js file is partially minified.
Prerequisite:
2.4.5
&& 2.4-develop
.Steps to Reproduce:
Expected result: jquery.validate.min.js file should be minified correctly Actual result: jquery.validate.min.js file incorrectly minified Screenshots:
Checked both M2 versions
Hence,confirming the issue.
Thanks
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-6594 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Lima. Thank you for verifying the issue.
Issue Available: @engcom-Lima, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
@magento I am working on this
Any update on this issue?
I found the root of the error, but it is not in the m2 files, but in third-party files/libs ( jquery libs or in the minifactor itself). Maybe I could deliver some plugin later ( There is a certain regular expression in the jquery.validate file that stops execution when approached by the minifier
https://github.com/tedious/JShrink/issues/110 For now, I'm following the updates here. I think it makes sense to wait until the original module has this problem solved and update it to the latest version.
Simply solve it by updating JShink:
cd project_root
cd vendor/magento/framework/
composer require tedivm/jshrink ^1.7 --no-update
cd project_root
composer update
@minhluan259 Thank you. I will create a separate MR a little later ( if updating the module really solves the problem )
@minhluan259 Thanks for your input. That means fixing this issue is by updating the JShrink plugin from 1.4 to 1.7. I do think Magento devs have not done that yet because in version 1.5 of JShrink PHP 7.0 support dropped. Starting from Magento 2.4.6 (june 2023), the devs dropped support for PHP 7.4 but left JShrink unchanged. That is just assuming tho.
Side note for others, when doing this command, the following also installed/updated (at least on my 2.4.6-p3 environment):
Installing composer/composer (2.6.6): Extracting archive And asked for this: "magento/composer-dependency-version-audit-plugin contains a Composer plugin which is currently not in your allow-plugins config. Do you trust to execute code and wish to enable it now?"
Tomorrow I will confirm if this fixes it or not as I yet have to deploy this on the production I am running.
The following error was showing up when compliming:
Application code generator... 3/9 [=========>------------------] 33% 11 secs 386.0 MiBPHP Fatal error: Cannot declare trait Composer\Repository\CanonicalPackagesTrait, because the name is already in use in /vendor/magento/framework/vendor/composer/composer/src/Composer/Repository/CanonicalPackagesTrait.php on line 23
I've reverted version 1.7 back to 1.4 and did composer reinstall magento/framework
in root folder. I think this happened because of some dependencies. Not sure.. Maybe someone else can include it in a different way and test it?
@git-seb If you are using Magento 2.4.6-p3, just run composer update
in the project folder. It will automatically update JShrink to v1.7
Just wanted to give a heads up on this thread. This is not yet fixed. Even after updating to Jshrink v1.7. I can confirm on multiple production environments.
Hi, Did we get any solution for this issue?
Hello,
We are facing the same issue. Any progress about a merge about it?
Preconditions and environment
How it should be:
Don't have deep knowledge of Magento but this is all the info I can provide.
Steps to reproduce
Expected result
Minify jquery.validate.min.js correctly
Actual result
Minification of jquery.validate.min.js is incorrect
Additional information
No response
Release note
No response
Triage and priority