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

Error "extend ' .no-link a' has no matches" when compiling email-inline css using an alternative less compiler #22330

Closed
hostep opened this issue Apr 14, 2019 · 5 comments
Labels
Component: Other Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@hostep
Copy link
Contributor

hostep commented Apr 14, 2019

Preconditions (*)

  1. Magento 2.3.1
  2. PHP 7.1.27
  3. Nodejs 8.15.1

Steps to reproduce (*)

  1. Setting up vanilla Magento installation using composer
  2. Run npm install [email protected] to install an alternative less compiler then what Magento ships with
  3. Run bin/magento setup:static-content:deploy -f -t Magento/luma en_US (this is just to generate the necessary files in var/view_preprocessed)
  4. Run node_modules/.bin/lessc --no-color var/view_preprocessed/pub/static/frontend/Magento/luma/en_US/css/email-inline.less | head

Expected result (*)

  1. No errors during less compilation

Actual result (*)

  1. First line of output says: extend ' .no-link a' has no matches

Discussion

This was done using the Magento/luma theme, but can be reproduced using the Magento/blank theme as well.

I can get rid of the less compilation problem by removing the following lines:

But not sure if removing these lines is good, I think this has something to do with the difference between inline email styles and non-inline email styles. But I don't know much about the logic of how that works.
The .no-link a mixin (?) is defined over here btw: https://github.com/magento/magento2/blob/2.3.1/app/design/frontend/Magento/blank/web/css/source/_email-base.less#L136-L140

@m2-assistant
Copy link

m2-assistant bot commented Apr 14, 2019

Hi @hostep. 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 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

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

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Apr 14, 2019
@hostep
Copy link
Contributor Author

hostep commented Apr 14, 2019

Alright, if I understand it correctly, the mixin .no-link a should get outputted for the selector .address-details a in the generated email.css file, but not in the email-inline.css file.

According to the comments in the css files around those lines ("Remove address and phone number link color on iOS"), it is to remove the link styling from links in the address details block in sales emails, like for example on the phone number.

Here's an example with an order confirmation email:
Screenshot 2019-04-14 at 18 23 59

This already happen and it is currently correct in Magento 2.3.1, so this isn't a bug which is visible, but we can still easily fix the less compilation error itself without affecting the end result, by wrapping the offending lines in the .email-non-inline() mixin. This seems to result in the exact same output but then without the less compilation error.

I'll create a PR with a fix for this shortly.

@m2-assistant
Copy link

m2-assistant bot commented Apr 18, 2019

Hi @engcom-backlog-nazar. 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.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.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. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

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

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

@ghost ghost added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Component: Other Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Apr 18, 2019
@ghost ghost removed their assignment Apr 18, 2019
@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Apr 18, 2019
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-backlog-nazar
Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-99256 were created

Issue Available: @engcom-backlog-nazar, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Apr 20, 2019
@magento-engcom-team
Copy link
Contributor

Hi @hostep. Thank you for your report.
The issue has been fixed in #22332 by @hostep in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.2 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Other Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

2 participants