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

Product Page - Links Broken? Please Help! #21

Open
djgoulaer opened this issue Jan 13, 2015 · 14 comments
Open

Product Page - Links Broken? Please Help! #21

djgoulaer opened this issue Jan 13, 2015 · 14 comments

Comments

@djgoulaer
Copy link

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
Copy link
Collaborator

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

@djgoulaer
Copy link
Author

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/<esi:include src="http://www.cheiroecor.com.br/varnishcache/getformkey/" />/" method="post" id="product_addtocart_form"> <input name="form_key" type="hidden" value="<esi:include src="http://www.cheiroecor.com.br/varnishcache/getformkey/" />" /> <div class="no-display">

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

code2

`

`

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

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

@PHOENIX-MEDIA
Copy link
Collaborator

Can you please try esi_syntax=0x3 instead?

Am 13.01.2015 um 23:20 schrieb djgoulaer <notifications@github.commailto: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//issues/21#issuecomment-69832193.

@djgoulaer
Copy link
Author

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
Copy link
Author

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
Copy link

Nasatya commented Mar 4, 2015

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

Thanks for any help.

@campsafari
Copy link

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
Copy link

opalice commented Apr 4, 2015

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

@djgoulaer
Copy link
Author

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
#21 (comment)
.

@campsafari
Copy link

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
Copy link

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

@shameem5566123
Copy link

Same problem
selection_160

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

Please help.

@gubacelar
Copy link

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
Copy link

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.

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

No branches or pull requests

8 participants