GithubHelp home page GithubHelp logo

Comments (5)

phizab avatar phizab commented on August 22, 2024

We noticed the same problem and solved it by changing the file app/design/frontend/base/default/template/varnishcache/cookie/formkey.phtml in line 33:

From:
if (document.cookie.length && (document.cookie.indexOf('=') == -1)) {

To:
if (document.cookie.indexOf('=') == -1) {

Does anybody know why there is the cookie length check?

from magento-pagecache-powered-by-varnish.

dleone81 avatar dleone81 commented on August 22, 2024

I've tried your fix and works on Magento single store!
I've a multi-store Magento installation and I following your tip and added some additional steps:

  1. I've not hardcoded varnishcache/cookie/formkey.phtml but I've created this into my custom template folders -> app/design/frontend/**default/mycustomtemplate/**template/varnishcache/cookie/formkey.phtml
  2. Added in System > Configuration > General > Web > Cookie Session, foreach domain I've add the specific url as www.mydomain.com and b2b.mydomain.com
  3. Flush Magento cache
  4. Clear all cache
  5. Clear Varnish cache
  6. Restart Varnish (optional but recommended)

Thank you

Magento 1.8.1
Varnish 3.0
NginX + PHP-FPM

from magento-pagecache-powered-by-varnish.

xinhus avatar xinhus commented on August 22, 2024

I've solved it with the setting "Use SID on Frontend" to "yes"
System > Configuration > General > Web > Session Validation Settings

I don't know if has logic, but worked fine

from magento-pagecache-powered-by-varnish.

Emulator000 avatar Emulator000 commented on August 22, 2024

Same issue here, if I open the site the first time in Incognito mode I can see a different form_key generated and the PAGECACHE_FORMKEY is different also after refreshing the page etc.
Can't add any Product to the cart and the site is unusable.

I'm missing something? How I can make it work correctly every time someone visit the site?

from magento-pagecache-powered-by-varnish.

dleone81 avatar dleone81 commented on August 22, 2024

solved using Lesti-FPC!
Varnish make me crazy ... it was very very fast on loading but so hard to configure no-cache elements as megamenu ...

from magento-pagecache-powered-by-varnish.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.