With Magento 2.0.4 cache, more specifically page cache enabled, everything works.
If I disable it, clear cookies, and login as customer than products in minicart are not there.
Welcome message does not really work right. I have to add a product to cart from a product page in order to see the minicart. Than if I go to checkout, country is not displayed in address summary (shipping address already added in my account).
I've done debugging and it looks like the problem is pointing to:
private_content_version is set in
module-page-cache/view/frontend/web/js/page-cache.js and used in
With page cache disabled, the data is not loaded from the server as the function
When page cache is disabled the cookie
private_content_version is not there (page-cache.js is not executed off course). But the cookie
section_data_ids has only '*' and 'messages' => empty (false or null).
When page cache is enabled there is
section_data_ids has what keys with values:
*: null cart: 123 compare-products: 123 customer: 123 directory-data: 123 last-ordered-items: 123 multiplewishlist: 123 review: 123 wishlist: 123
After I login with page cache enabled, on customer dashboard there are 2 additional ajax requests that load data:
These contain json objects with customer specific data and directory data like all countries and regions.
With these calls, on checkout the address summary displays the country name.
Is this a Magento 2 bug or it's something that I messed up ? Thanks