5

Shortly after applying the SUPEE-9767 patch we started to receive complaints from customers that products could not be added to cart from the product detail page.

We are sometimes able to reproduce the issue, but sometimes not.

We are on a fully patched version of EE 1.14.2.2.

Disabling full page cache resolves the issue.

1
  • <comment moved> Commented Jun 8, 2017 at 8:31

2 Answers 2

7

The issue is caused by the Enterprise Page Cache.

The form key is created at: app/code/core/Enterprise/PageCache/Model/Processor.php:422 which ultimately calls setcookie().

Then the cookie value is retrieved at: app/code/core/Enterprise/PageCache/Model/Observer.php:1043 in the same request.

As the headers/cookies have not been sent the value returned is null. This causes the core/session cookie to not update with the value Page Cache has just created which is supposed to happen at:

app/code/core/Enterprise/PageCache/Model/Observer.php:1045. 

The patch below will resolve this issue. https://gist.github.com/cmtickle/477aba06d8d6a69148de542bfb56ed45

6
  • in EE 1.14.3.3 the code is correct and uses a slightly better variant than what your gist uses. also, PATCH_SUPEE-9767_EE_1.14.3.2_v1-2017-05-22-07-20-39.sh does seem to modify the observer accordingly, but might be missing the Cookie.php changes. are you sure your patch applied successfully, as the end result would look different from what the gist's initial code state is... Commented Jun 7, 2017 at 22:31
  • this is part of a cache problem we reported a few weeks ago and was partly fixed as SUPEE-9805 before it was integrated in SUPEE-9767 - at least for the 1.14.3.x version, maybe it was not properly backported. Commented Jun 7, 2017 at 22:42
  • I've confirmed that the patch was applied successfully without issue. May be an issue in 1.14.2.x Commented Jun 8, 2017 at 7:37
  • Once my patch for the patch is applied you may need to clear Block and FP cache for it to work as expected. Commented Jun 8, 2017 at 8:32
  • Any idea if v1.13.1.0 is affected by this? I have a client that is having an add to cart issue since the patch, but I can't reproduce it at all. Commented Jun 9, 2017 at 14:01
0

We fixed a 1.14.3.2 installation by backporting the PageCache module entirely from 1.14.3.3. Be careful that the local pool override doesn't work, so we had to edit the core. I hope Ben Marks won't notice what I just wrote.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.