Questions tagged [form-key]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4
votes
3answers
3k views

Magento 2.3 — Invalid Form Key. Please refresh the page

Getting Invalid Form Key. Please refresh the page error not able to do any action after upgrade of Magento 2.2.5 to Magento 2.3.
0
votes
1answer
1k 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?
0
votes
0answers
33 views

Magento 1.9.4.3 item not added to basket when button clicked

I have just successfully updated to 1.9.4.3 from 1.9.4.2. However, in one of my custom blocks the add to basket doesn't work, item does not get added to the basket. Analysing the url from $this->...
0
votes
1answer
1k 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 ...
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 ...
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. <?...
0
votes
1answer
23 views

Even after Adding Form Key in phtml Magento 2.3 shows invalid form key error often

I added Form key in all forms. But in some forms still, I am getting Invalid form key Please refresh error often. How to solve this? Is I need to add further things to solve this? Kindly help me.
0
votes
1answer
47 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 ...
1
vote
0answers
81 views

Magento 2.3.2, Amazon Sales Channel: Invalid security or form key. Please refresh the page

I have installed amazon sales channel v2 for magento 2.3.2 store. Now when I try to click 'Connect to amazon store' from 'Setup Amazon Store' section, I'm getting error 'Invalid security or form key....
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?
5
votes
4answers
1k 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......
1
vote
2answers
716 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
34 views

Product Page Bug Magento 2.3.1

I am making a product page that has a product with multiple options for height and width in a dropdown. When I more than about 40 options, the page wont save them anymore. The page will just say ...
0
votes
0answers
39 views

How to remove “form_key” in magento2

How can I remove "form_key" globally in my magento2 store?
1
vote
5answers
8k views

How to send a form key with post data using ajax to a controller in magento?

Suppose I have an ajax function like this in a separate js file jQuery.ajax({ url: "/package/module/index/index", type: "POST", data: {name: user_name, dob: date_of_birth},//here i want ...
10
votes
1answer
2k 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. ...
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 ...
0
votes
1answer
24 views

I have Problems when uploaded the image on my product in backend magento 2.3.2

today when try to upload the image on my product, magento show me this error firts time magento show me this error becauses, before i edited all my products, and now magento show me this.
0
votes
1answer
37 views

Get session form key in javascript m1

In my product review form the form key fetched from core/session is cached and does not pass the validation upon form submission. So, Mage::getSingleton('cor/session')->getFormKey() and $this->...
4
votes
0answers
68 views

Invalid form key. please refresh the page. Discount code and Paypal review

This one seems different to all the previous questions about this error message. I'm getting the following message "Invalid form key. please refresh the page." when trying to enter a discount code or ...
0
votes
0answers
15 views

Magento2 people on same network logged into each others account with form keys disabled

With magento config:set admin/security/use_form_key 0 People say that sometimes they are logged into each others accounts. I'm not sure how this is possible since they never log into each others ...
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.
0
votes
0answers
86 views

Magento 2.3.1 | Continuously Redirecting To Homepage & Getting “Invalid Form Key. Please refresh the page” Error

I am working on a payment module using Magento 2.3.1. I have already implemented CsrfAwareActionInterface and 2 of its methods (createCsrfValidationException() & validateForCsrf()) in my ...
2
votes
0answers
10 views

Why did the Payment section stopped working after switching primary domain? And - does Form Key Validation On Checkout need to be enabled?

Porto theme I switched the primary domain in our Magento 1.9.4 store and then the Payment section of the checkout stopped working altogether - you could select a Payment method by placing a tick in ...
4
votes
3answers
3k views

External Request - Invalid Form Key Magento 2.3

I sent a “POST” request via external server for version magento-2.3 My internal Magento URL cannot verify and response is "Invalid Form Key. Please refresh the page." as a summary, i want to ...
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 ...
0
votes
1answer
230 views

magento2 Invalid Form Key on chrome

Invalid Form Key. Please refresh the page? My chrome browser always give this error even if I have changed the php.ini configuration max_input_vars = 75000 I am using nginx server and public IP (...
2
votes
0answers
75 views

Magento 1.7 OnepageCheckout SaveBilling returns 200 -> nothing happens

When I click on the continue button inside the billing section, the tiny loading icon appears and a request is triggered. It returns 200 with an empty response. But then... nothing happens and there ...
0
votes
0answers
145 views

Invalid Form Key. Please refresh the page. while submiting form

i'm using magento 2.3 and got this error while i try to submit a custom form in a product detail page, have tried to increas max_input_vars option in php.ini but it didn't solve anything, any other ...
2
votes
1answer
348 views

Form Key Validation Error

So I have fixed my form key validation issues but my admin is still showing an error message. Important: Formkey validation on checkout disabled. This may expose security risks. We strongly ...
6
votes
7answers
7k views

Form Key Error when removing a product from Mini cart

So this is a problem that I have been trying to solve for a few days now. I'm not an expert at this, but I manage quite a bit through googling and testing myself. My website is more or less ready to ...
3
votes
4answers
4k 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
2answers
112 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 $...
1
vote
1answer
96 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
2
votes
0answers
771 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
2answers
959 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
2answers
238 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.
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
408 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
2answers
331 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 ...
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 ...
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 ...
0
votes
1answer
496 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
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 ...
7
votes
2answers
3k views

Undefined index: form_key in … downloader/Maged/Model/Session.php on line 252

After applying patch SUPEE-6285 on Magento 1.9.1.0, I am seeing the following error in system.log several times a day: Undefined index: form_key in ... downloader/Maged/Model/Session.php on line ...
0
votes
2answers
620 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
201 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
1answer
137 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.
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
150 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....