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

Minifying templates breaks when two consecutive comments exist and first is // #34880

Closed
1 task
iwkse opened this issue Dec 23, 2021 · 9 comments
Closed
1 task
Labels
Area: Framework Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Reported on 2.4.2 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@iwkse
Copy link

iwkse commented Dec 23, 2021

I've noticed when you use // with phtml the static generator is going to strip the comment, it doesn't happen the same when using # or /* */

Preconditions (*)

Tested with 2.4.2

Steps to reproduce (*)

  1. Write in a phtml template file, something like:
<span><?php // foo ?><?php // bar ?></span>

Expected result (*)

<span><?php ?><?php ?></span>

Actual result (*)

<span><?php</span>

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

m2-assistant bot commented Dec 23, 2021

Hi @iwkse. 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.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

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

@iwkse iwkse changed the title Static content generation breaks phtml when two consecutive comments with // exist Static content generation breaks phtml when two consecutive comments exist and first is // Dec 23, 2021
@iwkse iwkse changed the title Static content generation breaks phtml when two consecutive comments exist and first is // Minifying templates break when two consecutive comments exist and first is // Dec 23, 2021
@iwkse iwkse changed the title Minifying templates break when two consecutive comments exist and first is // Minifying templates breaks when two consecutive comments exist and first is // Dec 24, 2021
@engcom-Hotel engcom-Hotel self-assigned this Dec 24, 2021
@m2-assistant
Copy link

m2-assistant bot commented Dec 24, 2021

Hi @engcom-Hotel. 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.

@mrtuvn
Copy link
Contributor

mrtuvn commented Dec 28, 2021

PR Fix here #33016

@engcom-Hotel
Copy link
Contributor

Hello @iwkse,

We have tried to reproduce the issue in Magento 2.4-develop branch and it is reproducible for us with the given steps in the main description.

Hence confirming the issue.

Thanks

@engcom-Hotel engcom-Hotel added Area: Framework Reported on 2.4.2 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Dec 31, 2021
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.magento.com/browse/AC-2058 is successfully created for this GitHub issue.

@m2-assistant
Copy link

m2-assistant bot commented Dec 31, 2021

✅ Confirmed by @engcom-Hotel. Thank you for verifying the issue.
Issue Available: @engcom-Hotel, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@sdzhepa sdzhepa added the Priority: P3 May be fixed according to the position in the backlog. label Jan 13, 2022
@github-jira-sync-bot github-jira-sync-bot added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. and removed Priority: P3 May be fixed according to the position in the backlog. labels Jul 18, 2022
@github-jira-sync-bot github-jira-sync-bot added the Progress: PR Created Indicates that Pull Request has been created to fix issue label Jul 25, 2022
@engcom-Hotel
Copy link
Contributor

engcom-Hotel commented Sep 14, 2022

Hello,

As I can see this issue got fixed in the scope of the internal Jira ticket AC-2058 by the internal team
Related commits: https://github.com/magento/magento2/search?q=AC-2058&type=commits

Based on the Jira ticket, the target version is 2.4.6.

Thanks

@m2-community-project m2-community-project bot added Progress: done and removed Progress: PR Created Indicates that Pull Request has been created to fix issue Progress: PR in progress labels Sep 14, 2022
@maaarghk
Copy link

maaarghk commented Jul 7, 2023

did anyone test it or did you just put it out there for a laugh to see what would happen

@engcom-Hotel
Copy link
Contributor

Hello @maaarghk,

As per the process, we are testing all the PRs before merging them and as I can see in its related JIRA, there is a QA comment that this issue has been fixed.

But still, if you found that the issue is still not fixed, then please let us know in more detail. We will be happy to reopen this to work on this.

Thanks

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Framework Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Reported on 2.4.2 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
Archived in project
Development

No branches or pull requests

6 participants