Questions tagged [form-key]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
19
votes
1answer
35k views

What is getBlockHtml('formkey')?

I am trying to edit the product edit page (first tab) in Magento and would like to move the quantity (as well as a few other things) from their respective tabs up to the first page. I see <form ...
8
votes
11answers
55k views

Error - Invalid Form Key

I meet a problem with magento 1.9.2.3, an error message appears when I connect with my custom admin form. I created a module and I duplicated the customer/account/login page for my users role. <?...
18
votes
8answers
48k views

“invalid form key. please refresh the page” - cannot login to admin panel

I regularly visit my site to make sure its working and noticed that images for products were not appearing, thinking it was a problem with indexing cache I tried to login to the admin panel and ...
12
votes
3answers
14k views

Magento 2 - What is the use of formkey

I see this line of code inside the login form. <?php echo $block->getBlockHtml('formkey'); ?> What is the use of it? Is it more secure? Is it a must for form post?
1
vote
1answer
1k views

Magento upgrade to 1.9.3.4 - is forms working without form_key output in templates

I've just upgraded to Magento v1.9.3.4 and have Enabled Form Key Validation On Checkout as recommended. Magento also advices: Important! Enabling this option means that your custom templates used ...
5
votes
1answer
2k views

Cache blocks that contain form_key (i.e. dynamic content)

I wonder, if there is a best practice to use block caching for blocks that contain a form with the form_key input (CSRF token). I am not talking about full page cache hole punching, but the standard ...
7
votes
1answer
1k views

What is the form_key used for?

I really don't understand the form_key feature. I have found several sites asking and dealing with issues about the form_key but none explained the reason for it's existence. Everyone just worked ...
6
votes
2answers
13k views

Form Key Value in template and controller

The following function is used to get the form key in templates with type hidden. My customerController.php does not validate the form key with the method _validateFormKey(). When I echo the following ...
1
vote
1answer
3k views

Bypass Magento's form key usage to allow simple product to be added to cart

Magento CE 1.9.0.1 Just upgraded from CE 1.7 and our links that we previously used to add products to cart no longer work. Examples: http://www.website.com/checkout/cart/add?product=215&qty=1 ...
1
vote
2answers
3k views

Get customer login form key

I want create login functionality outside magento, but same server. For this I created a login form, but without correct form key it is useless. Is there way to get customer login form key? Here is ...
3
votes
2answers
2k views

Magento2.3 Product Add to Wishlist Invalid Form Key. Please refresh the page?

I am using php 7.2.13 version and magento 2.3 latest version in xampp. When i do add to wishlist and save anything am getting Invalid Form Key. Please refresh the page? this error.
2
votes
1answer
88 views

I've just applied SUPEE-9767 to a Magento 1.6.2.0 site and there is no formkey option to enable. How has this happened and how can I fix it please?

I have applied the SUPEE-9767 patch for the correct version (1.6.2.0) of Magento and in the admin area, I can see the warning at the top of the page, indicating that the patch was successful. However,...
0
votes
1answer
51 views

Invalid Form Key. Please refresh the page while creating new users in Magento 2.3

Whenever adding new users or editing, updating the products in frontend shows the error Invalid Form Key. Please refresh the page. *I increased the value of input_max_var but still it showing the ...