magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

With enabled cache KO object exists on page initialization that should be loaded only after add to cart action

Open kandrejevs opened this issue 10 years ago • 7 comments

I added a new object to section, that is loaded on checkout/cart/add action. Problem is that this KO object binding exists on page initialization if the cache is enabled.

Steps to reproduce

  1. Add new KO object to checkout/cart/add action
  2. Create KO template, that outputs data from this object wrapped in if statement. Insert template in product page.
  3. Enable cache
  4. Add product to cart or sometimes it appears even without adding items to cart.
  5. Browse other products.

Expected result

Data inside KO template should only be outputed after product is added to cart and KO bindings are loaded via section.

Actual result

With enabled cache binded KO object exists on page initialization and content inside KO template appears after page is loaded.

Note, my new KO binding is made in the same way as "cart" section, but cart KO binding does not exist at page initialization.

kandrejevs avatar May 16 '16 07:05 kandrejevs

@ kandrejevs Please, provide the used version. If the problem is actual for a specific tag, please, specify it and be sure that the latest update was used.

palamar avatar Jun 22 '16 16:06 palamar

@palamar issue is still present in 2.1.0 and 2.0.7 versions.

kandrejevs avatar Jul 04 '16 11:07 kandrejevs

Hi @kandrejevs , We are going to investigate under MAGETWO-55442 internal ticket.

anton-huz avatar Jul 15 '16 10:07 anton-huz

let me know, if you need code example

kandrejevs avatar Jul 28 '16 13:07 kandrejevs

@kandrejevs, thank you for your report. We've created internal ticket(s) MAGETWO-55442 to track progress on the issue.

magento-engcom-team avatar Nov 29 '17 15:11 magento-engcom-team

Hi @kandrejevs

This ticket has been marked as "Triage Wanted" due to low user involvement over time. Over the next 2 weeks we are looking for additional community feedback to decide if it should be archived or not. More information on this is available on the GitHub wiki.

Thank you for collaboration.

magento-engcom-team avatar Jul 30 '18 06:07 magento-engcom-team

@kandrejevs thank you for your report.

Unfortunately, we are archiving this ticket now as it did not get much attention from both Magento Community and Core developers for an extended period. This is done in an effort to create a quality, community-driven backlog which will allow us to allocate the required attention more easily.

You may learn more about this initiative following this link.

Please feel free to comment or reopen the ticket if you think it should be reviewed once more. Thank you for collaboration.

magento-engcom-team avatar Aug 20 '18 08:08 magento-engcom-team