Advertisement

"The security token did not match." upon login on frontend after upgrading to 3.7

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
User avatar
faramarz58
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Wed Apr 16, 2008 8:32 pm

"The security token did not match." upon login on frontend after upgrading to 3.7

Post by faramarz58 » Thu May 11, 2017 12:34 pm

I recently upgraded to 3.7, also upgraded PHP to 7 and I remember the site and the login was okay after the upgrade but since yesterday this warning pops up when a user tries to login on frontend:
Warning
The security token did not match. The request was aborted to prevent any security breach. Please try again.
Why am I getting this message and why the login fails? How to troubleshoot? I can login to Admin and everything in admin looks fine.

In the error_log in the root, I see these PHP warnings:

[10-May-2017] PHP Warning: Invalid argument supplied for foreach() in /libraries/cms/plugin/helper.php on line 102
[10-May-2017] PHP Warning: Invalid argument supplied for foreach() in /libraries/cms/menu/site.php on line 118
[10-May-2017] PHP Warning: Invalid argument supplied for foreach() in /libraries/cms/menu/menu.php on line 76
[10-May-2017] PHP Warning: Invalid argument supplied for foreach() in /libraries/cms/menu/menu.php on line 259
[10-May-2017] PHP Warning: Invalid argument supplied for foreach() in /libraries/cms/menu/menu.php on line 259
[10-May-2017] PHP Warning: Invalid argument supplied for foreach() in /libraries/cms/menu/menu.php on line 259
[10-May-2017] PHP Warning: Invalid argument supplied for foreach() in /libraries/cms/menu/menu.php on line 259
[10-May-2017] PHP Warning: Invalid argument supplied for foreach() in /libraries/cms/plugin/helper.php on line 102

Are these related to the security token issue?

Advertisement
itoctopus
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4025
Joined: Mon Nov 25, 2013 4:35 pm
Location: Montreal, Canada
Contact:

Re: "The security token did not match." upon login on frontend after upgrading to 3.7

Post by itoctopus » Thu May 11, 2017 2:06 pm

I would say this is likely caused by one of your system plugins. Try disabling your non-core system plugins one by one until you find the culprit.
http://www.itoctopus.com - Joomla consulting at its finest
https://twitter.com/itoctopus - Follow us on Twitter

User avatar
faramarz58
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Wed Apr 16, 2008 8:32 pm

Re: "The security token did not match." upon login on frontend after upgrading to 3.7

Post by faramarz58 » Thu May 11, 2017 2:23 pm

Will do. On the side note, I am not getting the login error when I try logging in via http://mydomain.com/index.php. It is only happening on http://mydomain.com/.

Also, this might be a different issue, I am using Protostar as my default template, I switched the style to Fluid layout under Advanced tab, now fluid layout is being shown on http://mydomain.com/index.php and I can login but not on http://mydomain.com/. I am still seeing the Static layout on mydomain.com and the login does not work.

User avatar
candidosa2
Joomla! Explorer
Joomla! Explorer
Posts: 350
Joined: Sun Nov 05, 2006 10:20 pm
Location: Joomla Moçambique
Contact:

Re: "The security token did not match." upon login on frontend after upgrading to 3.7

Post by candidosa2 » Sat May 13, 2017 8:23 pm

Well I'm having the same mistake
The only plugin I activated was System - Page Cache

Let try now to fixes

rowdyred94
Joomla! Intern
Joomla! Intern
Posts: 97
Joined: Tue Jun 02, 2009 12:10 pm

Re: "The security token did not match." upon login on frontend after upgrading to 3.7

Post by rowdyred94 » Wed May 17, 2017 2:39 am

I'm seeing the same thing, and the problem seems to have messed up our CiviCRM instance, too. Our contribution page pre-populates one particular user for all visitors.

weredigi
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri May 19, 2017 1:30 pm

Re: "The security token did not match." upon login on frontend after upgrading to 3.7

Post by weredigi » Fri May 19, 2017 1:36 pm

I am having the exact same issue. BUT if I log in again right away it does work.
Guess we will have to tell those trying to login to do it twice ... sort silly

This sort fo bug goes way back in the forums is there actually anyone actively trying to find a fix to keep this working? This is something that should not be affected by plugins or anything else added to the site. I'm not an advanced coder but there must be a way to not have this be affected by additional add-ons of any sort.

User avatar
lupoll86
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 129
Joined: Sat Sep 26, 2015 5:44 pm

Re: "The security token did not match." upon login on frontend after upgrading to 3.7

Post by lupoll86 » Fri Jul 21, 2017 3:29 am

This has not been fixed so far.

It does happens when the plugin "System - Page Cache" is enabled and when we try to login on the front end of Joomla.

It does let us login on the second attempt but it comes back when we log out and try to login again.

I will try to see if I found a solution but so far the only one is by disabling the plugin.

I will update here if I fix it.
My Web Design Services in Fort Worth Texas: https://cleansites.us
Mi Blog de Joomla en Español: https://gramerlab.com

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20667
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America/
Contact:

Re: "The security token did not match." upon login on frontend after upgrading to 3.7

Post by leolam » Fri Jul 21, 2017 6:21 am

https://issues.joomla.org/tracker/joomla-cms/12030 We know the issue but not yet addressed so do NOT activate the page cache plugin (!)

Leo 8)
Joomla Professional Support Services
Over 35.000 support requests solved
Just contact us through the Joomla Support channels if you want help

User avatar
steveorg
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 158
Joined: Tue Oct 30, 2007 5:17 pm
Location: The wrong coast

Re: "The security token did not match." upon login on frontend after upgrading to 3.7

Post by steveorg » Thu Feb 15, 2018 6:37 pm

leolam wrote:https://issues.joomla.org/tracker/joomla-cms/12030 We know the issue but not yet addressed so do NOT activate the page cache plugin (!)

Leo 8)
If I understand correctly, the request seems to have been denied. Too bad because I still have the issue with Joomla 3.8.5.

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: "The security token did not match." upon login on frontend after upgrading to 3.7

Post by sozzled » Thu Feb 15, 2018 7:12 pm

@steveorg: The tracker item referred to by @leolam was created 1½ years ago (back in the days of J! 3.6). While it appears that the issue hasn't been formally addressed for J! 3.6+ (and you've discovered your own workaround, anyway) we need to be careful about addressing these matters in multiple places across the forum.

As a general rule plugins, that are disabled by default within a standard Joomla installation, should only be enabled when there's a need to enable them and when people understand the consequences of enabling them. The System - Page Cache plugin is not generally required.

The article (https://www.energizethemes.com/blog/joo ... -Work.html) helps to understand its purpose:
Page caching (System page cache plugin)

Page caching (system cache plug-in) basically takes a snapshot of the whole page including the templates, components and modules.

This option gives you no control over the module cache settings or over the progressive or conservative options included in the global configuration settings.

If you have a website with static content and only publish an article now and again then this is a good option for you. As and when you publish new articles or make updates at Your website you can always quickly clear the cache.
So that's why it exists and the situations where it may be useful. The other cache settings in the Global Configuation do not rely on this plugin to be enabled.

Summary: Enabling the System - Page Cache plugin may cause other unintended consequences (for example "The security token did not match" message) and, if that's the case, then the remedy is to disable the plugin. Caching, in general, can cause other unintended consequences, too but there are thousands of articles and forum topics that discuss those things.

fancyhome
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sat Jun 23, 2018 11:56 am

Re: "The security token did not match." upon login on frontend after upgrading to 3.7

Post by fancyhome » Sat Jun 23, 2018 12:24 pm

it is the system-encyript plugin causing this error. I disabled this plugin and login works perfect now...

Advertisement

Locked

Return to “General Questions/New to Joomla! 3.x”