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

magento/magento2#4389 Widget cache error #12764

Merged
merged 1 commit into from
Apr 19, 2018

Conversation

AlexandrKozyr
Copy link
Contributor

  • fixed CacheKey assignment

Description

Fixed Issues (if relevant)

  1. Widget cache error #4389: Widget cache error

Manual testing scenarios

  1. Install Magento from develop branch.
  2. Add two widgets of type 'Catalog Product List' to the 'CMS homepage' at location content.bottom with different titles, but the same conditions. For example, condition could be product price is greater than 0
  3. Refresh cache and visit homepage

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • 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)

- fixed CacheKey assignment
@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Dec 15, 2017

CLA assistant check
All committers have signed the CLA.

@magento-engcom-team magento-engcom-team added bugfix Component: Cms mageconf Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Dec 15, 2017
@dmanners
Copy link
Contributor

dmanners commented Jan 2, 2018

Thank you for this pull request @AlexandrKozyr I am just wondering if there was any particular reason you went for the template and title rather than using the widget id for the cache key?

@ishakhsuvarov
Copy link
Contributor

Hi @AlexandrKozyr
I am closing this PR for now due to inactivity. Please reopen if you wish to continue at any time.

@AlexandrKozyr
Copy link
Contributor Author

AlexandrKozyr commented Apr 14, 2018

Hi @dmanners. thank u for ur review and remark. I have double checked case and possibility to use id for the widget and found out that there is no separate identity created in the persistent layer with. there are 4 params that creates widgets inside cms block -

{{widget type="Magento\CatalogWidget\Block\Product\ProductsList" title="Speciaal geselecteerd" products_count="6" template="product/widget/content/gridspecial.phtml" conditions_encoded="a:2:[i:1;a:4:[s:4:type;s:50:Magento|CatalogWidget|Model|Rule|Condition|Combine;s:10:aggregator;s:3:all;s:5:value;s:1:1;s:9:new_child;s:0:``;]s:4:1--1;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Product`;s:9:`attribute`;s:12:`category_ids`;s:8:`operator`;s:2:`==`;s:5:`value`;s:3:`742`;]]"}}

but for some reasons title and template are not inside cahce key. my fix add them as th last possible params for uqiness identification of cache file.

@magento-engcom-team
Copy link
Contributor

Hi @AlexandrKozyr. Thank you for your contribution.
Changes from your Pull Request will be available with the upcoming 2.2.5 release.

@abhaykhatariya
Copy link

Magento 2.2.5 have same problem with widget cache error. same widget showing twice.

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Jul 3, 2018

Hi @abhaykhatariya,
For some reasons these changes weren't added to release 2.2.5. Probably they will be added to on of next releases.
As for now you could apply these changes using composer patches

@abhaykhatariya
Copy link

abhaykhatariya commented Jul 4, 2018

@ihor-sviziev Where is the patch ? can you please send me link for that patch
same problem into magento 2.2.5 when we add cms static block using widget

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Jul 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Component: Cms Progress: accept Release Line: 2.2 Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants