Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [form-key]

The tag has no usage guidance.

0
votes
2answers
27 views

Magento 2 formkey validator is not working properly in my custom module, return a 500 page

I have an issue that i can not use formkey Validator in my custom module, the module is working fine for me if i am just echoing some text messages, but if i construct the $formKeyValidator or the $...
0
votes
0answers
28 views

Codeception Onepagecheckout issue

I'm writing acceptance test useing Codeception and Selenium-webdriver for Magento 1.9 site and I got some issue. The trouble is when I fill Onepagecheckout form manualy I successfuly pass it, all is ...
1
vote
1answer
22 views

Magento 2 - What's the purpose of Formkey Validator?

I want to know what does the formkey validator do : Magento\Framework\Data\Form\FormKey\Validator
0
votes
0answers
24 views

Unable To Continue Checkout - Continue Button Does Nothing On Checkout - Guest Checkout Stuck At Step 2 & Registered User Checkout Stuck At Step 1

I am trying to get this problem fixed for both problems without any luck, and it is really frustrating me. What files to I have to edit in cPanel file manager for Magento, and what exact code and ...
2
votes
0answers
79 views

Magento 2 : Invalid Form Key. Please refresh the page

I get this error when I try to save a category, Invalid Form Key. Please refresh the page. I tried the following solutions from various other posts Increase php_value max_input_vars 75000 Try to ...
0
votes
0answers
59 views

Magento2 : Form_Key is empty in checkout/sidebar/removeItem

In magento2 store when I click on removeItem from mini cart then form_key is getting empty in ajax call. I checked in module-checkout/view/frontend/web/js/sidebar.js in ajax call form_key is going ...
0
votes
2answers
314 views

How to add formkey to a custom form?

I'm using the code... <?php echo $block->getBlockHtml('formkey') ?> inside my custom phtml file but all I get is blank ''. I see this same code used throughout Magento Core. How can I ...
0
votes
0answers
75 views

Magento2 : form_key validation is not working

I have created a custom form and on form submit trying to validate form_key in controller key. My code is as below : use Magento\Framework\Data\Form\FormKey\Validator; class custom extends \Magento\...
0
votes
1answer
46 views

Magento2.2.4 - Invalid form key while save product

I have Magento 2.2.4. I have tried increasing max_input_vars in php.ini file. I have cleared var/cache, browser cache, removed domain cookies. Still, get the error when trying to edit an existing ...
0
votes
0answers
104 views

Form Key cookie is set twice - Magento 2.2.4

I am having two different form_key cookies being set on my browser for my Magento 2.2.4, one on domain 'www.example.com' and one on '.www.example.com'. My cookie path is set to / and my cookie domain ...
4
votes
3answers
654 views

Magento 2.2.4 Customer are unable to logout

i´ve just installed a fresh Magento2 on my webspace to prepare the migration of my Magento 1.9. I installed my theme (Infortis) and created my products and did the first test-salse. Everything fine......
0
votes
2answers
115 views

How to get a product review form form key in magento 1.9?

I want form key of product review form in magento 1.9 , Can anyone tell me how to get product wise formkey programatically.
0
votes
0answers
215 views

Gordon Lesti Full Page Cache form key error

I'm having a problem with Gordon Lesti FPC extension for Magento (i'm using ver. 1.9.3.6). I've installed the extension and configured it, all is working well, except ajax delete and ajax update ...
0
votes
0answers
44 views

Unable to register user in Magento 2.1.11

I've new magento 2.1.11 installation in AWS AMI web server, running centos, when I fill registration form it doesn't give me any error in browser console nor in var/log/*.log files or in /var/log/...
0
votes
2answers
509 views

Patch SUPEE-10415 applied but Form Key Validation message still appears

Patched Magento Open Source 1.9.3.6 with SUPEE-10415. Message: Formkey validation on checkout disabled. This may expose security risks. We strongly recommend to Enable Form Key Validation On ...
0
votes
0answers
151 views

Different form key in template and controller

When I am directly accessing customer/account/login page then, values for $this->getRequest()->getParam('form_key'); and Mage::getSingleton('core/session')->getFormKey(); are different when ...
0
votes
2answers
217 views

Magento block in before_body_end with form_key being cached

Magento block in before_body_end with form_key being cached We use a block for login form data in the block before_body_end. Only since some time we have seen this block is cached and the form_key ...
0
votes
0answers
83 views

Error : Add to Cart Not Working After Upgrade

I upgraded my website from 1.7 to the last version of 1.9 Now when i click to "Add to Cart" i get a huge Error (see the image) Could any one help me ?
0
votes
1answer
121 views

Form key doesnt change remains the same - resulting 403 forbidden error on few links magento 1.9.2

i have further investigated in my case and i have identified that the form key generated is not generating new form key . instead it is using the same form key for all users and pages www....
2
votes
0answers
799 views

Shopping cart always “empty” after 1.9.3.4 upgrade

I have upgraded magento to 1.9.3.4 via magento connect from 1.9.3.3 and now whenever I try to add a product to the cart it says shopping cart empty. I added <?php echo $this->getBlockHtml('...
2
votes
4answers
2k views

Magento 2 Form key

if (!$this->_validateFormKey()) { // do something } Any Magento 1 equivalent in Mangento 2 for _validateFormKey function. And Can anyone explain how and where Magento checks formkey, when any form ...
0
votes
1answer
297 views

1.9.3.4 Different shipping address stuck

I upgraded to 1.9.3.4 from 1.9.3.3. When I go through checkout and select ship to a different address other than billing no form keys seem to be present in the header. (saveShipping) When you go ...
1
vote
1answer
894 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 ...
1
vote
1answer
140 views

CE v1.9.3.4 (v2) did NOT fix the “Enable Form Key Validation On Checkout” Was released July 12,2017

@Ryan-hoerr YESTERDAY sent out message that there was v2 Patch or upgrade to v1.9.3.4 from v1.9.3.3 because of the form_key checkout problem which the Magento CE 1.9.3.4 Release Notes was supposed to ...
1
vote
2answers
577 views

Error with Form Key Validation on logout

I just enabled form key validation and there's an error showing up on logout: My Magento version is 1.9.2.2 with last patch 9767 applied Invalid method Mage_Core_Model_Session::renewFormKey(Array ( )...
0
votes
1answer
792 views

Magento 2 - invalid form key (add/delete from cart)

I have serious problems with custom Magento 2 theme and (probably) formkey cashing. I have 2 views of exactly same e-shop. - View 1: Luma Theme - View 2: Custom Theme (Luma child) - overriding ...
2
votes
1answer
84 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
219 views

Unable to delete the update product from minicart through ajax

I am unable to delete the updated product from the mini cart. this is the code: path : app/code/core/Mage/Checkout/controllers/CartController.php public function ajaxUpdateAction() { if (!...
1
vote
1answer
854 views

Form_key cookie in magento 2

I see that in magento 2 form_key is set in cookies. Is this cookie present in every page?
0
votes
1answer
98 views

How to make seo friendly form_key whishlist link

https://www.websitename.in/wishlist/index/addd/product/715/form_key/1LEJOC1edAL6N0Wi/ Seo person asked me to make these links seo friendly . Is there any way in which this can be achieved.
1
vote
1answer
41 views

magento 1.8 user Login not working and in Login page " /> code displayed

User login not working and it not displayed error message also. And the following code will shows " /> in login page, chechout page <?php echo $this->getBlockHtml('formkey'); ?> Already i ...
0
votes
1answer
187 views

Invalid Form Key, Please Refresh Page at Checkout Magento 1.9.1

i havent changed any cookies settings that some people have mentioned to try. I did install memcache, im not sure if that is related. local.xml <config> <global> <install&...
9
votes
1answer
1k views

Frontend form key is being overwritten

i am currently having issues with frontend forms where the form keys are somehow being overwritten and displaying incorrect form keys. I am currently debugging this issue on the customer login form. ...
0
votes
1answer
376 views

Custom Admin Login Form [Form_Key Error]

I have located the problem precisely but I don't know how to solve it. When I'm on my custom cms page with my new admin login form, Magento gives me a different key_form than my default admin login ...
0
votes
1answer
609 views

How to generate formkey in Magento and send a POST request?

Magento uses some sort of form key to send POST data. I want to send POST data to a controller in Magento and receive it. How do I do that?
1
vote
1answer
99 views

Varnish cached Page without Magento hit

We're using Varnish as Page Cache, but we need to make a Ajax-Request on every page view to load the dynamic Stuff. In our case it's: global messages mini Cart form key We reduced the amount of ajax ...
4
votes
2answers
4k views

Why Form Key is added in every page In Magento 2

Why Form Key is added in every page In Magento 2 as a hidden input type. <input type="hidden" value="dEOXfL0kxDc8W4Yt" name="form_key"> I observed how it is generated. Is there any specific ...
1
vote
3answers
429 views

Invalid form key data - cannot login

I just downloaded and installed the Full Release of Magento Community - ver 1.9.2.4, but I can't login in backend and frontend. The error message is: Invalid Form Key. Please refresh the page. ...
16
votes
6answers
35k 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 ...
0
votes
0answers
77 views

Invalid Form Key please refresh the page / Unable to add to cart

Out of the blue customers can't add anything to the cart. When trying to log in to the backend we get : Invalid Form Key. Please refresh the page. Also the page is running very very slow. I checked ...
0
votes
1answer
45 views

Unwanted form_key popup

So I just added a Buy Now button in my store using this previously answered question: Magento 1.9 How to add buy now button in product page? Everything works fine, however I'm getting a pop up after ...
11
votes
3answers
10k 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
0answers
22 views

formkey in layered navigation links on search results pages?

I just noticed that the layered navigation links in catalogsearch/result have a formkey embedded in the URL. The links look like: https://www.example.com/catalogsearch/result/index/form_key/...
5
votes
2answers
11k 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 ...
2
votes
2answers
3k views

Magento 1.9 can't add items to shopping cart Form key problem

I have several Magento stores hosted on bluehost. They had been running well for a couple of months and then suddenly one day the customers just could not add products to the shopping cart any more. ...
0
votes
1answer
261 views

Update qty on cart page doesn't work because of formkey conflict

Configuration: Varnish + Pagecache module, Redirect all pages to www. in htaccess Issue: Whenever someone hits non-www page a PAGECACHE_FORMKEY cookie is stored. Then they get redirected to www. and ...
4
votes
2answers
1k views

Form Key Problems After Changing Domains 1.9.2.1

After changing domains, from dev.mysite.com to mysite.com I can no longer login to the backend, I am getting below error: Invalid Form Key. Please refresh the page. Also, Customers cannot sign in ...
2
votes
1answer
259 views

SUPEE 7405: Add Form Key to sidebar/default.phtml

After installing SUPEE 7405 my custom theme Sidebar Cart stopped deleting products. When delete button is clicked, throws an error: "Cannot remove the product". Looks like I need to add Form Key to ...
1
vote
1answer
5k views

Magento admin login Error : invalid form key. please refresh the page

I am new to magento. I have recently setup my site on magento. Today I was trying to increase the logout time frame for admin session as it used to logout in few seconds. As I tried to save the time ...
8
votes
10answers
51k 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. <?...