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

Fix false cache_lifetime usage in xml layouts #16086

Merged
merged 1 commit into from
Jul 3, 2018
Merged

Fix false cache_lifetime usage in xml layouts #16086

merged 1 commit into from
Jul 3, 2018

Conversation

yuriyDne
Copy link

Fix cache_lifetime usage with false value

Description

Fix
<argument name="cache_lifetime" xsi:type="boolean">false</argument>
Usage eg in
Magento/Swatches/view/frontend/layout/checkout_cart_configure_type_configurable.xml

Fixed Issues (if relevant)

  1. magento/magento2#<issue_number>: Issue title
  2. ...

Manual testing scenarios

Reproduced in 2.2 and 2.1 version

  1. Add configurable product to cart
  2. Move to cart
  3. Edit Configurable product

Expected result
Configurable product options should be preselected

Actual result:
Configurable product options are not preselected

It happens because there is a check in
View/Element/AbstractBlock.php
protected function _loadCache() { if ($this->getCacheLifetime() === null || !$this->_cacheState->isEnabled(self::CACHE_GROUP)) { return false; }

Contribution checklist

  • [x ] Pull request has a meaningful description of its purpose
  • [x ] All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-engcom-team magento-engcom-team added Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner labels Jun 13, 2018
@magento-engcom-team
Copy link
Contributor

Hi @yuriyDne. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on Pull Request changes
  • @magento-engcom-team give me new test instance - deploy NEW test instance based on Pull Request changes
  • @magento-engcom-team give me {$VERSION} instance - deploy Vanilla Magento instance for Issue or Pull Request

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

@magento-engcom-team
Copy link
Contributor

Hi @yuriyDne. Thank you for your contribution.
We will aim to release these changes as part of 2.2.6.
Please check the release notes for final confirmation.

Please, consider to port this solution to 2.3 release line.
You may use Porting tool to port commits automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Framework/View Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Progress: accept Release Line: 2.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants