cameras in the cloud

this is our weblog. it includes ramblings on the latest in home and business video monitoring, cool gadgets for the home, cloud and mobile technologies, web development, along with other random topics.

30
Nov

How to Solve Invalid Token Error with Joomla

Posted by on in Web Development
  • Font size: Larger Smaller
  • 2 Comments

Have you ever experienced the "Invalid Token" error while looking at a Joomla built website?

Invalid Token

Well if you have, read on. I've seen two different sources of this error:

  1. System cache
  2. Issue with a field validation form

It seems that when users try to log in when they are already logged in you may get an Invalid Token error. Check that your Joomla "System-Cache" plug-in has "Use Browser Caching" set to No.

The other issue is with extensions. It has happened twice to me now that after using an extension that has some form field validation I get "Invalid Token" errors.

Typical Invalid Token messages come from prevention of Cross Site Request Forgery (CSRF). Details of CSRF and the use in Joomla can be found here.

In both of my instances I was able to find the form that was the culprit. It was just a matter of finding the code and making sure it I added this just before closing the form tag:

<?php echo JHTML::_( 'form.token' ); ?>

I'd like to think this is a rare thing to find but in both of my cases it was found in well known Joomla extensions. I've since reported the issue with those extension providers and it's been fixed, but this will undoubtedly keep coming up for others. 

Hopefully this saves you some of the headache.

Tagged in: joomla

Entrepreneur and Camcloud founder. I'm a 12+ year tech veteran. Former Director of Product Management and Certified Scrum Product Owner (CSPO). I focus on front-end web development with jQuery, HTML5 & cloud infrastructure.


Find me on Twitter

Comments

  • Guest
    Steve Tuesday, 01 January 2013

    I get this error every time i go to log in and fat finger on my password. The last character in my PW is a ! which requires a shift press. And in a hurry if you are still holding down shift when you press enter to submit, it opens the 'submit' link in a new tab/window. Every time this happens to me i get the invalid token error. I simply close the extra tab and re log in and all is well. Hope this helps!

  • Guest
    TIMBER MTB Monday, 11 February 2013

    Thanks, the System-cache fix seems to have resolved this problem for us!

Leave your comment

Guest Thursday, 23 May 2013

Mobile

Want Camcloud on your mobile device? We've got you covered. 
Learn about Camcloud for Android or Camcloud Mobile for iPhone.

Get it on Google Play

Contact Us

1-855-519-1530 

sales@camcloud.com

support@camcloud.com

Security

Your privacy is important to us. We use strong encryption on the secure areas of our website and we will never share your information.