PHOENIX-MEDIA / Magento-PageCache-powered-by-Varnish

Community version which is available on Magento Connect (http://www.magentocommerce.com/magento-connect/pagecache-powered-by-varnish.html)
89 stars 49 forks source link

Product Page - Links Broken? Please Help! #21

Open djgoulaer opened 9 years ago

djgoulaer commented 9 years ago

Hello! I installed the latest version of Varnish Server 3 and the module Page Cache following exactly the instructions in the Readme.txt file.

But in my product page some strange things are happening:

It appears this aima product code name:

/ "Method =" post "id =" product_addtocart_form ">" />

And this code below the button add to cart:

/ "Onclick =" productAddToCartForm.submitLight (this, this.href); return false; "class =" link-wishlist ">

To try to help you understand my problem, follows some pictures of headers:

chache1 headers1 headers2 cokies

PHOENIX-MEDIA commented 9 years ago

Seems like you forgot to set esi_syntax startup parameter (see readme). Can you check the HTML code to see if you find an tag?

djgoulaer commented 9 years ago

Hello, thank you for your help. I checked and found the html tags, but they appear to conflict with the standard HTML.

Here the words at the beginning of the form:

... code1

`<form action="http://www.cheiroecor.com.br/checkout/cart/add/uenc/aHR0cDovL3d3dy5jaGVpcm9lY29yLmNvbS5ici9wZXJmdW1lcy9wcm9kdXRvLXRlc3RlLmh0bWw_X19fU0lEPVU,/product/1/form_key//" method="post" id="product_addtocart_form"> <input name="form_key" type="hidden" value="" />

` And here the words of the links to add to cart, wishlist and compare: ![code2](https://cloud.githubusercontent.com/assets/3249296/5730539/2265a9a4-9b62-11e4-9bcb-f8f5f84cea42.JPG) `` To help, below the stretch as is my startup configuration of Varnish: ![daemon](https://cloud.githubusercontent.com/assets/3249296/5730542/26e4b6d2-9b62-11e4-9ca0-dc9f46415fc9.JPG) `DAEMON_OPTS=${DAEMON_OPTS:--b localhost \ -p esi_syntax=0x03 \ -p shm_reclen=4096}`
PHOENIX-MEDIA commented 9 years ago

Can you please try esi_syntax=0x3 instead?

Am 13.01.2015 um 23:20 schrieb djgoulaer notifications@github.com<mailto:notifications@github.com>:

Hello, thank you for your help. I checked and found the html tags, but they appear to conflict with the standard HTML.

Here the words at the beginning of the form:

/" method="post" id="product_addtocart_form"> " />

And here the words of the links to add to cart, wishlist and compare:

To help, below the stretch as is my startup configuration of Varnish:

DAEMON_OPTS=${DAEMON_OPTS:--b localhost \ -p esi_syntax=0x03 \ -p shm_reclen=4096}

— Reply to this email directly or view it on GitHubhttps://github.com/PHOENIX-MEDIA/Magento-PageCache-powered-by-Varnish/issues/21#issuecomment-69832193.

djgoulaer commented 9 years ago

Wow your help is being fantastic!

Not solved yet, but had considerable progress.

After the last change of the esi configuration (esi_syntax = 0x3) the problem persisted, but not quite.

When clean the cache magento and browser, and access the site (like a user accessing the first time) the problem persists.

But if I update the page with a "CTRL + F5" the problem is solved almost completely, except for one small detail at the beginning of the form as the image below:

code3

What do you think we should do? Because if I clear the cache returns the problem, ie if a user visits the website for the first time he will find the error.

EDIT:

I found another error in this configuration:

If I click the add to cart button, the product will not go to shopping cart. The cart remains empty.

djgoulaer commented 9 years ago

Problem status:

The problem that made the products were not added to the shopping cart has been solved using this module:

https://github.com/deivisonarthur/Inovarti_FixAddToCartMage18

However I still the problem that makes a mess in the html code of the form and links "add_to". This problem happens only when the user first access, since as I had said before, if I press the Ctrl + F5 keys the html back to normal. (With the exception of a small detail in the top of the form)

Does anyone have a suggestion?

Thanks for your help.

Nasatya commented 9 years ago

@djgoulaer I have the same problem with my multsite magento store. Did you find any solution on this problem?

Thanks for any help.

campsafari commented 9 years ago

i have the same problem that for example on the customer account forms the esi includes somehow produce this " /> after the form key. It also happens when only the module is installed and varnish not. So my guess is that it is related to the PHP code.

opalice commented 9 years ago

same problem esi includes somehow produce this " /> after the form key. http://goo.gl/lhVy53

djgoulaer commented 9 years ago

I was unable to solve the problem or found on the internet that someone has solved .

Also did not get satisfactory support from developers , since when the problem became complicated they stopped trying to help.

I followed all recommendations and documentation , but it still fails .

So , I gave up using the module.

Atenciosamente,

Diego José Goulart +55 62 81964028

On Sat, Apr 4, 2015 at 4:05 PM, Raf notifications@github.com wrote:

same problem esi includes somehow produce this " /> after the form key. http://goo.gl/lhVy53

— Reply to this email directly or view it on GitHub https://github.com/PHOENIX-MEDIA/Magento-PageCache-powered-by-Varnish/issues/21#issuecomment-89641720 .

campsafari commented 9 years ago

It seems like the form key esi include is not escaped correctly...i will have a look when i can find some time. as a quick fix i removed esi includes for form keys...

eyesonmedia commented 9 years ago

@campsafari same problem :( do you have an idea?

shameem5566123 commented 9 years ago

Same problem selection_160

/" method="post" id="product_addtocart_form" > " />

Please help.

gubacelar commented 9 years ago

I have a similar problem on customer/address/edit/id/.

" /> This was showing on my screen because getFormKey was returning <esi:include src="***/varnishcache/getformkey/" />. What I did to work was just force HTML escape with htmlentities

on formkey.phtml

<input name="form_key" type="hidden" value="<?php echo htmlentities(Mage::getSingleton('core/session')->getFormKey()) ?>" />
jonathonbyrdziak commented 9 years ago

This is the same problem as issue #17 of which we've fixed by adjusting the quotation marks in Esi.php. They've even created a pull request to fix it.