Questions tagged [form-key]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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
55 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 ...
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
0answers
24 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/...
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 ...
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 ...
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
308 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
286 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
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. <?...
2
votes
1answer
248 views

Error 404 after update to 1.9.2.0 - during registration

After update to 1.9.2.0 I have added the form-key to my registration template. I can see the form-key value using firebug on the registration page, but when I submit the form, I get a 404 error: ...
1
vote
1answer
653 views

How can I bypass _validateFormKey securely?

I am allowing WordPress to load Magento widgets by overriding Mage_Widget_Adminhtml_Widgetcontroller as shown below. I'm ensuring that a user is logged in as admin, but am I opening up myself to ...
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
118 views

Which form file is being used currently? Registration doesn't work

After a heavy upgrade to 1.9.2.2 and re-downloading all modules, running supee-6788-toolbox and downloading a new version of the theme, I still run into problems. In the renderd registration page I ...
2
votes
3answers
497 views

Magento admin custom form with multiple entry

I have a custom form in Magento admin. When I submit the form with multiple click of the save button the multiple entry are inserted in my table, even if I have a form key. if ($data = $this->...
2
votes
1answer
209 views

magento subdomain website $this->getRequest()->isPost() return blank in every form submission

I have magento website in domain and also in sub domain. The domain website form work correctly i.e. $this->getRequest()->isPost() return true after form submission. But the subdomain website ...
0
votes
2answers
1k views

Can't add product to compare, _validateFormKey() return false

I'm updating an old Magento instance from 1.7.0.2 to 1.9.2.1 (I know there is the v. 1.9.2.2). I'm also using the Ultimo theme, but i tested the bug also with the standard RWD theme that comes with ...
6
votes
2answers
7k views

After applying SUPEE-6788 can't create customer

After installing the patch, customers are unable to register accounts.
2
votes
1answer
338 views

mini log-in form does not log in

I put a mini-login block in the left column of home. But when I am trying to log-in from there, it takes me to the log-in page with no errors. In my search, I have seen that we should use a variable ...
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
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 ...
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 ...
4
votes
2answers
1k views

Initial Form Key not Matching with Varnish/Turpentine in Firefox

I'm running into a weird issue with Varnish, Turpentine, and Firefox which is, in all likelihood, something very specific to the configuration of the system I'm working on. I'm asking about it here ...
3
votes
1answer
1k views

Magento form key invalid after page becomes inactive for extended period of time

Running a recently upgraded instance of Magento CE 1.9.1.0 (from 1.7.0.2). Form key support was built in to the theme and is functioning a-okay when browsing the website with different browsers and ...
3
votes
0answers
410 views

Magento 1.9.0.1 add a product to the cart by URL from external site? [closed]

I need to add multiple products from an external site to a Magento store. The stores sells cake decorations and they wan't to create recipes in their Wordpress blog, and with a simple press of a ...
1
vote
1answer
1k views

Edit Customer Address Form's Name Fields

I am editing the layout of my edit.phtml in template/customer/address/, i have edited the layout and labels of some fields there, no problem. Except, i have 3 fields in the code which i can't edit ...
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 ...
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 ...
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 ...
0
votes
2answers
9k views

Form Key issues on new magento version

As we know that Form key feature has been added to new versions of Magento. This affects old themes or modules for adding product to cart, wishlist and placing an order. I faced a situation where a ...
18
votes
3answers
24k views

Getting correct FormKey

I have a page that I listed products, that's it. Its kind of catalog/view.phtml clone. Just included app/Mage.php. In this page I use Mage::getSingleton('core/session')->getFormKey(); but it's ...