-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
FPC: Upsells & Related product list bug - getIdentities gets called while the block doesn't render and then crashes #5897
Comments
hostep
changed the title
Upsells & Related product list bug: getIdentities gets called while the block doesn't render and then crashes
FPC: Upsells & Related product list bug - getIdentities gets called while the block doesn't render and then crashes
Jul 29, 2016
@hostep Where are we on this issue? What do we need to do for an interim fix? |
Bug is still exist on latest develop version. |
I'll have a look on it @okorshenko |
kassner
added a commit
to kassner/magento2
that referenced
this issue
May 29, 2017
This was referenced May 29, 2017
magento-team
pushed a commit
that referenced
this issue
Jun 1, 2017
magento-team
pushed a commit
that referenced
this issue
Jun 1, 2017
[EngCom] Public Pull Requests - MAGETWO-69573: Adding logo in media folder #9797 - MAGETWO-69555: Allow for referenceBlock to include template argument #9772 - MAGETWO-69540: Fix for #5897: getIdentities relies on uninitialized collection #9777 - MAGETWO-69533: [BUGFIX][6244] Fix Issue with code label display in cart checkout. #9721 - MAGETWO-69499: Update select.js #9475 - MAGETWO-69451: Replace Zend_Json in the configurable product block test #9753 - MAGETWO-69373: Customer with unique attribute can't be saved #7844 #9712 - MAGETWO-69369: Replace the direct usage of Zend_Json with a call to the Json Help class #9344 - MAGETWO-69085: Do not hardcode product link types #9600 - MAGETWO-69554: Patch to allow multiple filter_url_params to function #9723
Fixed in #9777 and merged to develop branch |
Thanks @kassner & @okorshenko! |
magento-engcom-team
pushed a commit
that referenced
this issue
Jul 17, 2020
Fixed issues: - MC-35884 Consumers improvement - MC-35827 Test and merge PR with extended message queue consumer configuration
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Preconditions
Steps to reproduce
Install Magento CE 2.1.0 using composer
Go to the backend
Create 2 simple products: 'Product 1' & 'Product 2', set a name, a price, make sure they have a possitive qty and are in stock and make sure you can see them on the frontend
Create 2 configurable products: 'Product 3' & 'Product 4', set a name, a price, add some configurations (with the color attribute for example)
Add 'Product 1' & 'Product 2' as upsells to the products 'Product 3' & 'Product 4'
Change the 'Stock Status' of 'Product 3' to 'Out of Stock'
Run
bin/magento indexer:reindex
Run
bin/magento cache:flush
Verify you can see 'Product 3' (http://example.com/product-3.html) and 'Product 4' (http://example.com/product-4.html) with their upsells
Create a custom frontend theme which inherits from 'Magento/blank': 'My/Theme'
Create a file:
app/design/frontend/My/Theme/Magento_Catalog/layout/catalog_product_view.xml
with this contents:Go in the backend to Content => Design => Configuration
Change the Global theme to 'My Theme'
Run
bin/magento cache:flush
Refresh the 'Product 3' page (the page crashes)
Run
bin/magento cache:disable full_page
Refresh the 'Product 3' page (it works)
Run
bin/magento cache:enable full_page
Refresh the 'Product 3' page (it crashes again)
Go to 'Product 4' page (this one does work all the time)
Expected result
The page shouldn't crash with the full page cache enabled
Actual result
In step 15 and 19 we get this error:
Discussion
Although my use case is not very clever (because the related products don't show up with the full_page cache disabled on 'Product 3'), I still believe this is an actual bug.
What I think happens (not debugged properly): 'Product 3' is out of stock, so the block
product.info.form.options
doesn't get rendered because it makes no sense to show the options (right?).This probably causes the
Magento\Catalog\Block\Product\ProductList\Upsell::_beforeToHtml
to not being called, while theMagento\Catalog\Block\Product\ProductList\Upsell::getIdentities
does get called, and that method assumes the_beforeToHtml
method gets called firstThe same thing happens with Related products btw, so not only Upsells.
So no idea what the actual bug is, either:
product.info.form.options
should get renderedgetIdentities
shouldn't get called when a block isn't renderedgetIdentities
should return an empty array when the block isn't renderedMy biggest issue with this is that we have a different behavior between fpc enabled or not, the result should be the same, and in this case, it isn't.
Thanks!
(thanks to my colleague @koenner01 for helping me debug this thing!)
Related ticket: #3362
The text was updated successfully, but these errors were encountered: