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

JavaScript inside blocks not respecting FPC invalidation #10

Open
toddbc opened this issue Jan 13, 2016 · 2 comments
Open

JavaScript inside blocks not respecting FPC invalidation #10

toddbc opened this issue Jan 13, 2016 · 2 comments
Labels

Comments

@toddbc
Copy link

toddbc commented Jan 13, 2016

In Magento EE, blocks can have different invalidation than the page.

An example of this is the cart/minicart/items.phtml template. By default, inline JavaScript is emitted only when there are items inside the cart. When the cart changes, the block is invalidated - so this normally works fine.

With FPC and magento-footer-js, however, the JavaScript is moved to the footer only when it is first cached. Then the footer js is assumed to be static, even if the block is updated.

STR:

  1. View the homepage with a new browser session. This will cache the homepage with an empty cart and no JavaScript.
  2. Navigate to a product detail page and add to cart.
  3. Return to the homepage. The minicart will update its content, but the page will not have the associated JavaScript.
  4. Click "Remove" on any product. The link will fail, since it's a GET and missing a form key.

Possibly, it might be necessary to use a separate Processor, so that the js can be moved back to the footer after being pulled from the container cache. Getting it to order correctly with other already moved js seems potentially tricky.

@ogivaljevo
Copy link

How to upload magento-footer-js on magento 1.8.1.
Website www, ogi, rs

@bobbyshaw
Copy link
Owner

@ogivaljevo Hi, I'm afraid that I don't provide installation support. It can either be installed through the use of modman or by copying the app directory in to place. If you have any further problems, please create a separate issue rather than appending on this, unrelated, one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants