Update from joomla 3.4.8 to joomla 3.5.
Users can login from frontend without problems.
After they try to login, users take the message:
"The most recent request was denied because it contained an invalid security token. Please refresh the page and try again."
PHP Built On Windows 8
Database Version 5.6.24
Database Collation latin1_swedish_ci
Database Connection Collation utf8mb4_general_ci
PHP Version 5.6.8
Web Server Apache/2.4.12 (Win32) OpenSSL/1.0.1l PHP/5.6.8
WebServer to PHP Interface apache2handler
Joomla! Version Joomla! 3.5.0 Stable [ Unicorn ] 21-March-2016 22:00 GMT
Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
User Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
I update 4 off sites to joomla 3.5 and 2 off them have "invalid Token" issue on frontend login.
Some times users can login on frontend without issues, but if they logout and try to login again they face the same issue. Sometimes even on 3rd login/logout time, but the problem is still there.
Hi
I to have the exact same behavior when trying to log in on front end.
I've tried three different log in modules.
#1 Improved AJAX Login & Register
#2 BT Log in
#3 Joomla core log in
In all Three there is this "invalid token" error.
After that I tried to disable the cache and found that there was a system plug in named "system-sid-cache" after unpublishing this plug in Everything is working ok for me.
Labels |
Added:
?
|
That plugin does not exist in 3.5.0 nor in my site which was updated to 3.5.0. On my site that plugin id is system page cache
I found a solution to my problem but i really don't understand why this is happening.
First this problem only appears when you have conservating cache on and page cache plugin enabled.(if you disable them everything works again and there is no token issue ).
The problem was the configuration.php file. This file was working on joomla 3.4.8 but for some reason on joomla 3.5 gives this "token issue". When i change manually this file with configuration.php of the clean joomla 3.5 install everything worked again.
I sent you both configuration.php files that working and that notworking to test it for your self. First enable conservating cache on and page cache plugin. Then put configuration.php (that not working) file to your joomla3.5 installation and configure it manually to your settings you will see that after 2 or 3 login attempts you will get invalid token issue.
I think this is the problem with the most out there.
Not working configuration.php
<?php
class JConfig {
public $MetaAuthor = '1';
public $MetaDesc = '';
public $MetaKeys = '';
public $MetaRights = '';
public $MetaTitle = '1';
public $MetaVersion = '0';
public $access = '1';
public $cache_handler = 'file';
public $cachetime = '15';
public $caching = '1';
public $captcha = '0';
public $cookie_domain = '';
public $cookie_path = '';
public $db = 'joomla35';
public $dbprefix = 'e4ggj_';
public $dbtype = 'mysql';
public $debug = '0';
public $debug_lang = '0';
public $display_offline_message = '1';
public $editor = 'tinymce';
public $error_reporting = 'default';
public $feed_email = 'author';
public $feed_limit = '10';
public $force_ssl = '0';
public $fromname = 'joomla35';
public $ftp_enable = '0';
public $ftp_host = '';
public $ftp_pass = 'testpass';
public $ftp_port = '21';
public $ftp_root = '';
public $ftp_user = 'testuser';
public $gzip = '1';
public $helpurl = 'https://help.joomla.org/proxy/index.php?option=com_help&keyref=Help{major}{minor}:{keyref}';
public $host = 'localhost';
public $lifetime = '15';
public $list_limit = '20';
public $live_site = '';
public $log_path = 'C:\xampp\htdocs\joomla35/logs';
public $mailer = 'mail';
public $mailfrom = 'info@joomla35.gr';
public $memcache_compress = '1';
public $memcache_persist = '1';
public $memcache_server_host = 'localhost';
public $memcache_server_port = '11211';
public $offline = '0';
public $offline_image = '';
public $offline_message = 'This site is down for maintenance.
Please check back again soon.';
public $offset = 'UTC';
public $offset_user = 'UTC';
public $password = 'testpass';
public $robots = '';
public $secret = 'vyVTwxHmvQ9llIlJ';
public $sef = '1';
public $sef_rewrite = '1';
public $sef_suffix = '0';
public $sendmail = '/usr/sbin/sendmail';
public $session_handler = 'database';
public $sitename = 'joomla35';
public $sitename_pagetitles = '2';
public $smtpauth = '0';
public $smtphost = 'localhost';
public $smtppass = '';
public $smtpport = '25';
public $smtpsecure = 'none';
public $smtpuser = '';
public $tmp_path = 'C:\xampp\htdocs\joomla35/tmp';
public $unicodeslugs = '0';
public $user = 'root';
public $memcached_persist = '1';
public $memcached_compress = '0';
public $memcached_server_host = 'localhost';
public $memcached_server_port = '11211';
public $redis_persist = '1';
public $redis_server_host = 'localhost';
public $redis_server_port = '6379';
public $redis_server_auth = '';
public $redis_server_db = '0';
public $proxy_enable = '0';
public $proxy_host = '';
public $proxy_port = '';
public $proxy_user = '';
public $proxy_pass = '';
public $mailonline = '1';
public $massmailoff = '0';
public $session_memcache_server_host = 'localhost';
public $session_memcache_server_port = '11211';
public $session_memcached_server_host = 'localhost';
public $session_memcached_server_port = '11211';
public $frontediting = '1';
public $asset_id = '1';
}
and working configuration.php
<?php
class JConfig {
public $offline = '0';
public $offline_message = 'This site is down for maintenance.
Please check back again soon.';
public $display_offline_message = '1';
public $offline_image = '';
public $sitename = 'joomla35';
public $editor = 'tinymce';
public $captcha = '0';
public $list_limit = '20';
public $access = '1';
public $debug = '0';
public $debug_lang = '0';
public $dbtype = 'mysqli';
public $host = 'localhost';
public $user = 'root';
public $password = 'testpass';
public $db = 'joomla35';
public $dbprefix = 'e4ggj_';
public $live_site = '';
public $secret = 'vyVTwxHmvQ9llIlJ';
public $gzip = '0';
public $error_reporting = 'default';
public $helpurl = 'https://help.joomla.org/proxy/index.php?option=com_help&keyref=Help{major}{minor}:{keyref}';
public $ftp_host = '';
public $ftp_port = '';
public $ftp_user = '';
public $ftp_pass = '';
public $ftp_root = '';
public $ftp_enable = '0';
public $offset = 'UTC';
public $mailonline = '1';
public $mailer = 'mail';
public $mailfrom = 'info@joomla35.gr';
public $fromname = 'joomla35';
public $sendmail = '/usr/sbin/sendmail';
public $smtpauth = '0';
public $smtpuser = '';
public $smtppass = '';
public $smtphost = 'localhost';
public $smtpsecure = 'none';
public $smtpport = '25';
public $caching = '1';
public $cache_handler = 'file';
public $cachetime = '15';
public $MetaDesc = '';
public $MetaKeys = '';
public $MetaTitle = '1';
public $MetaAuthor = '1';
public $MetaVersion = '0';
public $robots = '';
public $sef = '1';
public $sef_rewrite = '0';
public $sef_suffix = '0';
public $unicodeslugs = '0';
public $feed_limit = '10';
public $log_path = 'C:\xampp\htdocs\joomla35/logs';
public $tmp_path = 'C:\xampp\htdocs\joomla35/tmp';
public $lifetime = '15';
public $session_handler = 'database';
public $memcache_persist = '1';
public $memcache_compress = '0';
public $memcache_server_host = 'localhost';
public $memcache_server_port = '11211';
public $memcached_persist = '1';
public $memcached_compress = '0';
public $memcached_server_host = 'localhost';
public $memcached_server_port = '11211';
public $redis_persist = '1';
public $redis_server_host = 'localhost';
public $redis_server_port = '6379';
public $redis_server_auth = '';
public $redis_server_db = '0';
public $proxy_enable = '0';
public $proxy_host = '';
public $proxy_port = '';
public $proxy_user = '';
public $proxy_pass = '';
public $massmailoff = '0';
public $MetaRights = '';
public $sitename_pagetitles = '0';
public $force_ssl = '0';
public $session_memcache_server_host = 'localhost';
public $session_memcache_server_port = '11211';
public $session_memcached_server_host = 'localhost';
public $session_memcached_server_port = '11211';
public $frontediting = '1';
public $feed_email = 'author';
public $cookie_domain = '';
public $cookie_path = '';
public $asset_id = '1';
}
I'm waiting for someone to recreate the problem in his environment with my configuration.php i already submit. This configuration.php (that say "not working") will recreate the problem on every joomla 3.5 installation with cache on and page cache plugin enabled. This is the configuration.php that i have used with all my joomla installations(2.5,3.0...) but now is problematic with joomla 3.5.
looks like one difference is dbtype mysql / mysqli
can this be the issue?
can joomla autodetect dbtype on update/save config/site transfer/etc.
and/or autoclear cache and autosave config... (maybe to improve userexperience)?
Changing database engines has absolutely nothing to do with the cache layer. And unless you're running PHP 7 having mysql
as the driver shouldn't make a difference either (on PHP 7 Joomla tries to use either mysqli
or pdomysql
(in order) since PHP's ext/mysql
was removed).
Also, dumping an entire configuration.php file here and saying "this works, this doesn't" isn't really helpful. Saying what configuration values are different in a working versus not working environment is helpful as you did with the whole conservative cache thing. Even if it is the entire configuration.php file that is the "issue", that barely covers what other things could affect something. If you can reproduce the issue consistently on a XAMPP platform but I can't on a Linux setup then it's just going to piss people off going back and forth in a "I have a bug, I can't reproduce it, the bug is there" battle.
Lastly, on extension IDs, unless it's ID = 700 Joomla could care less what the extension ID is. A
If you have the System - Page Cache enabled then you need to clear Joomla's cache every time you edit the site. If you have set to store cache in the Browser then you probably need to get your users to clear their browser cache as well.
Am testing now
So System - Page Cache is just for static sites?
Or Editors need admin-rights to clear cache...
Is silently auto-clearing cache of edited items (content/modules/etc) an option?
(maybe this needs own issue?)
Hi
I'm sorry, sometimes you mix things up with languages, in this case it was Swedish.
It´s the Joomla cache (System - Page Cache)
Sorry for this mix up with languages.
I've tested as below:
Global Configuration -> System
Conservativ caching on
Extension -> Plugins (filter for "cache")
System - Page Cache (unpublished)
Everything works.
Global Configuration -> System
Conservativ caching off
Extension -> Plugins (filter for "cache")
System - Page Cache (published)
It does not work. The "invalid token" error persist
Installed Joomla 3.4.8
Enabled registration
Enabled theSystem - Page Cache plugin with store to browser
Created new user front end
Logged in front end
Updated via Joomla updater to 3.5.0
Login front end failed
Login front end with a browser that never visited before Success
Disabled System - Page Cache plugin
Login front end with original browser Success
Enabled System - Page Cache
Login front end with original browser failed
Cleared Joomla's cache
Login front end with original browser Success
Conclusion
Joomla cache created by the System - Page Cache plugin causes problems with updated Joomla site. But once deleted Joomla cache created by the System - Page Cache plugin by the updated site does not.
Would it be possible for the update to clear the Joomla cache during the update ?
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-03-28 08:33:51 |
Closed_By | ⇒ | brianteeman |
I am closing this here and have created new issue #9626 to request a "flush cache on update" which would solve this on future updates
Thank you @ketihar, I ran into the same issue, while moving a site from 1 server to another. And while setting up the DB U apparently copied the db setting from the new install into my old configuration.php.
Anyhow, updating the driver to from mysql to mysqli, and switching off the cache made the problem go away. Still strange thought since on my old server I do have caching on and do not have this issue. I think there must be something else at play as well.
I assume that with mysql driver somehow the session is not removed properly?
I don’t think “flush cache on update” is a solution as this happen on all forms submit on Joomla 3.7.2 - PHP 7.1— Cause by Cache plugin — Turning it off stop the error (On 2 sites) — Also I got Regular Labs Cache Cleaner that do clear cache on any update in the sites.
It’s evident that you can’t have non-working Contacts Forms until an update is done on the site. Contact forms Have to work 100% of the time.
This isn't closed at all and its still an ongoing problem and has nothing to do with cache I have it disabled. People are leaving Joomla in droves because you guys cant fix this.
If two sites have no problems then it is Not a bug. It is a problem with the two sites that won't work. Possible causes
3rd party login
custom template
Joomla cache