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

Update AbstractTemplate.php #5741

Merged
merged 1 commit into from
Sep 28, 2016
Merged

Update AbstractTemplate.php #5741

merged 1 commit into from
Sep 28, 2016

Conversation

vivek201
Copy link
Contributor

Added strict comparison for $storeID

Regarding issues #5288, #5666 and #5703.

Issue:
Global Design Configuration does not save.

Scenario:
When the design configuration for the Global Scope is saved, the configuration tries to validate the transactional email header and footer templates through https://github.com/magento/magento2/blob/2.1/app/code/Magento/Theme/Model/Design/Config/Validator.php#L69.
For email templates, the $template is an object of Magento\Email\Model\Template which is inherited from Magento\Email\Model\AbstractTemplate . And in line 670 is the emulateDesign function.
When the design is saved from the global scope, the $storeId being passed is 0, so false is returned even when an actual value is being passed.

Solution:
Change the if condition to if ($storeId !== false).

Added strict comparison for $storeID
@quienti
Copy link
Contributor

quienti commented Jul 21, 2016

Duplicate #5729

@vivek201
Copy link
Contributor Author

Yeah, the pull request was made to 2.1 branch and I just read that only pull requests to dev branch will be accepted

@vkorotun vkorotun added bugfix and removed bug report labels Aug 5, 2016
@joanhe joanhe removed their assignment Aug 17, 2016
@vkorotun vkorotun added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Sep 14, 2016
@vkorotun vkorotun self-assigned this Sep 14, 2016
@vkorotun
Copy link
Contributor

Internal ticket: MAGETWO-58368

@mmansoor-magento mmansoor-magento merged commit bdf6230 into magento:develop Sep 28, 2016
@Ctucker9233
Copy link

@vkorotun @mmansoorebay Will MAGETWO-58368 be included in 2.1.3?

@paddz
Copy link

paddz commented Dec 16, 2016

It isn't included in 2.1.3, still got the same error.

@Ctucker9233
Copy link

Still not in 2.1.10. Can someone @magento-engcom-team please look at this?

@magento-engcom-team magento-engcom-team added Fixed in 2.1.x The issue has been fixed in 2.1 release line Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line labels Nov 11, 2017
@ishakhsuvarov
Copy link
Contributor

Hi @vivek201
We have just noticed that Contributor License Agreement was not signed for this Pull Request.

Could you please follow the CLA Assistant link and sign it?

Thank you for collaboration.

@vivek201
Copy link
Contributor Author

Hi @ishakhsuvarov, it's done

@ishakhsuvarov
Copy link
Contributor

@vivek201 Thank you for collaboration!

@Blatant
Copy link

Blatant commented Oct 17, 2018

@ishakhsuvarov & @magento-engcom-team, this issue is marked as fixed in Magento 2.1.x however I just checked out the latest 2.1 branch and it appears to be the old version?

https://github.com/magento/magento2/blob/2.1/app/code/Magento/Email/Model/AbstractTemplate.php

Is that right or have aI lost my marbles??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend bugfix Fixed in 2.1.x The issue has been fixed in 2.1 release line Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: accept
Projects
None yet
Development

Successfully merging this pull request may close these issues.