Skip to content

Static content deployment breaking template files in vendor #18048

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

Closed
kamilszewczyk opened this issue Sep 13, 2018 · 10 comments
Closed

Static content deployment breaking template files in vendor #18048

kamilszewczyk opened this issue Sep 13, 2018 · 10 comments
Labels
Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@kamilszewczyk
Copy link

Preconditions

  1. Magento 2.2.5

Steps to reproduce

  1. A module installed in vendor with a template file with a content
    <script src="//test.js/<?php echo $block->getParam() ?>/<?php echo $block->getParam() ?>"></script><script>runFunction(1, 2);</script>
  2. Run setup:static-content:deploy command
  3. Check content of the phtml file

Expected result

  1. A correct phtml file (not modified)

Actual result

  1. Modified and broken phtml file

Changing the <?php echo syntax to <?= fixes the issue but I don't think it's a desired behaviour?

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Sep 13, 2018
@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Sep 13, 2018

Hi @kamilszewczyk. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

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

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me {$VERSION} instance

where {$VERSION} is version tags (starting from 2.2.0+) or develop branches (2.2-develop +).
For more details, please, review the Magento Contributor Assistant documentation.

@kamilszewczyk do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@hostep
Copy link
Contributor

hostep commented Sep 13, 2018

@kamilszewczyk : I assume it only happens when html minification is enabled?
It sounds a bit like #5316 (which should get fixed in 2.2.6), since you also have something which looks a bit like a comment: //test.js (I assume this is just a placeholder for an actual domain name?). Does changing that to https://test.js fixes the issue as well?

@kamilszewczyk
Copy link
Author

@hostep
the HTML minification is actually disabled.
The //test.js is a placeholder for the domain name to include with same protocol as the current site.
Changing to https://test.js seems to fix the issue, but so is changing to <?= in the php opening tags.

It does seem very similar to the #5316 I will keep an eye on this issue in 2.2.6

@ghost ghost self-assigned this Sep 14, 2018
@ghost ghost added the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label Sep 14, 2018
@ghost
Copy link

ghost commented Sep 14, 2018

Hi @kamilszewczyk I'm not able to reproduce following steps you described. see attachments
selection_090
selection_089

@ghost ghost closed this as completed Sep 14, 2018
@ghost
Copy link

ghost commented Sep 14, 2018

@kamilszewczyk if you like to update the issue please reopen.

kamilszewczyk added a commit to kamilszewczyk/magento2-plugin that referenced this issue Oct 19, 2018
As mentioned in magento/magento2#18048
M2 team was not able to reproduce, however I was able to on another third party module.
@kamilszewczyk
Copy link
Author

Hello @engcom-backlog-nazar

I have just noticed the same issue occured on other 3rd party module and it was reported here YotpoLtd/magento2-module-yotpo-reviews#18
It seems that the PHP version is also a variable.
I've been testing my code on PHP 7.1.20-1+ubuntu18.04.1+deb.sury.org+1 can you please check reproducing of this error on it?

@ghost
Copy link

ghost commented Oct 25, 2018

Hi @kamilszewczyk thank you for you reply, yes i'm will testing this again, but if i'm good remember, I tested with the 7.1.20 php version

@kamilszewczyk
Copy link
Author

Well at least thanks to the yotpo module bug report I know that it's not a isolated case that happened only for me, but is actually encountered by other people

@ghost
Copy link

ghost commented Oct 29, 2018

Hi @kamilszewczyk I'm not able to reproduce this on clean instance, seems like this issue related only to custom module. Can we close issue ? and in future if someone found this we can reopen.

@ghost
Copy link

ghost commented Oct 30, 2018

@kamilszewczyk I'm closing this issue, If someone have the same issue, so in future we can reopen this.
Thank you.

@ghost ghost closed this as completed Oct 30, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests

3 participants