invalid token during logging in

Everything to do with Joomla! 1.5 templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
livineazy24
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Thu Apr 02, 2009 3:42 am
Contact:

Re: invalid token during logging in

Postby livineazy24 » Mon Jun 01, 2009 7:17 pm

After my post, I tried to login again and it happened again. Plus, I hit 6 instead of 7 in my last post. So to sum it up, still have problem even after I tried clearing cookies again and I do have IE 7. Sorry guys, thought I had it.

prilly
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 198
Joined: Thu Feb 26, 2009 11:09 am

Re: invalid token during logging in

Postby prilly » Mon Jun 01, 2009 9:43 pm

Firefox browser is useful for trying to find problems with the page. It can tell you if there's a javascript error. I use IE7 most of the time because that's what my users are most likely to have, but I do use Firefox when I'm trying to figure out what's gone wrong with my templates. It was very helpful.

User avatar
mlipscomb
Joomla! Ace
Joomla! Ace
Posts: 1271
Joined: Thu Mar 26, 2009 5:38 pm
Location: Gadsden, AL
Contact:

Re: invalid token during logging in

Postby mlipscomb » Mon Jun 01, 2009 11:12 pm

I wanted to add an off-the-wall comment here. I've had tons of trouble with this one and have oddly enough been able to fix a lot of JS errors/conflicts by using this plugin:

http://extensions.joomla.org/extensions ... 30/details

It's worth a try! :-) Hope it helps someone.
~Matt Lipscomb
http://www.USAFreelancers.org
Professional Joomla! Services and Web Development based in the USA

prilly
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 198
Joined: Thu Feb 26, 2009 11:09 am

Re: invalid token during logging in

Postby prilly » Tue Jun 02, 2009 1:51 am

Thank you, that's a good suggestion.

So far, my solution has been to remove all mootools, highslide, jquery apps from my templates and I just don't use them. Some of my components do use them, and then the components don't work because of what's on the template.

Today I was over looking at Dolpin, because I can understand the wisdom of having a program that's made to work together. Too many cooks spoil the broth.

User avatar
mlipscomb
Joomla! Ace
Joomla! Ace
Posts: 1271
Joined: Thu Mar 26, 2009 5:38 pm
Location: Gadsden, AL
Contact:

Re: invalid token during logging in

Postby mlipscomb » Tue Jun 02, 2009 2:38 am

While I agree that the various issues revolving around mootools, highslide and jquery do create some headaches, there are always ways around them.

Concerning Dolphin, I think it's great for community sites, but Joomla (especially with the 1.6 release coming up) is a strong competitor. For any other type of site - it's Joomla all the way for me.

Now granted, we're all entitled to our own opinions, but I think having so many developers that all bring something different to the table is a good thing. To me, Joomla is like a buffet - you only get what you're going to eat - the rest someone else can enjoy.
~Matt Lipscomb
http://www.USAFreelancers.org
Professional Joomla! Services and Web Development based in the USA

livineazy24
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Thu Apr 02, 2009 3:42 am
Contact:

Re: invalid token during logging in

Postby livineazy24 » Tue Jun 02, 2009 5:48 pm

OK Fellas and possibly Ladies, I think I may have a solution. First of all you do need to make sure that the appropriate files include <?php echo JHTML::_( 'form.token' ); ?>
which is near the bottom of, say for example modules/mod_login/tmpl/default.php If yours says anything other than that you need to update your version of Joomla. I am using 1.5.10. Any way, this is kind of a internal workaround fix. I'll state my specific problem first.
I was having a problem with both me and my users getting an "Invalid Token" error upon clicking a login button I had posted on the frontend. When I included a login module on the frontpage I and my users could log in with no issues and it was only when I or my users tried to click on the login button, which I found out was set to a path going through com_login. I realized I had no login component so I created a new menu item, selecting "user" and then the "default user login" as the menu type. Upon posting the menu link to the frontend I noticed that the default log in path the menu item was using begins with "com_user" and not "com_login." So, then I located the index.php file that was routing my login button when a user clicks on it on the front end and I replaced the path beggining with <a href="index.php?option=com_login..."
with
<a href="index.php?option=com_user&amp;view=login" title="BLAH, BLAH">
and vvvvuwala, instant path to the default login. Now I don't get any more "Token Errors" upon frontend clicking "Login."
I'm not sure if this was the issue for any others who posted here but for my problem it worked.

*Please note that updating your form token coding is a whole different topic and if your coding within modules/mod_login/tmpl/default.php (three lines from the bottom) says anything other than:
<?php echo JHTML::_( 'form.token' ); ?> [lets call it <CODE>]
you need to seek help from elsewhere to update your files. This <CODE> comes up in more places than just the default.php file I stated above, therefore changing only the default.php code within modules\mod_login\tmpl, will not fix anything and could possibly harm your system.

kallard
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Aug 18, 2009 5:03 pm

Re: invalid token during logging in

Postby kallard » Tue Aug 25, 2009 9:28 pm

Wow, looks like this is a long-occurring problem and everyone has a different take on it.

I am running Joomla 1.5.14, Php5, a template created in Artisteer2.

I do not have the highslide extension mentioned above.

I am using FF 3.5.2.

I get invalid token frequently both backend and frontend, but by going back or reloading, I manage to get in.

However, this is very annoying and, probably more annoying for my "customers" (I run and elementary school website).

What of the post above mine? Anyone have any new information since that date?

User avatar
DKY
Joomla! Intern
Joomla! Intern
Posts: 73
Joined: Tue Aug 19, 2008 1:53 pm
Contact:

Re: invalid token during logging in

Postby DKY » Wed Aug 26, 2009 12:58 pm

livineazy24
When I open my modules/mod_login/tmpl/default.php what exactly am I looking for? I can only find "com_user" and can't find any "com_login".
I am running Joomla 1.5.14.

RonP
Joomla! Apprentice
Joomla! Apprentice
Posts: 34
Joined: Tue Feb 19, 2008 3:05 am

Re: invalid token during logging in

Postby RonP » Wed Aug 26, 2009 4:10 pm

My goodness,

There is no authoritative answer here yet ? This thread has been going on for over as year now.
Model Railroading E-zine
http://www.modelersguild.com

djcoolio
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Aug 26, 2009 5:28 pm

Re: invalid token during logging in

Postby djcoolio » Thu Aug 27, 2009 4:42 pm

hi guys,
well here's another one to add to list.
I have been running Joomla for over a year with no probs at all

Now I find I have joined the "invalid token " Club

Just last week I got this error for the first time and now everytime I login only on admin do I get this error.
The only work around I have found is to keep clicking the back and forward buttons and refreshing then I eventually get into the backend. Also when I do get in the response on the back end is very slow and I usually have to do a refresh (f5) to get anywhere.

I have not added any components or plugins/modules for several months.

I am running Joomla 1.5.9, and get the same problem with IE8 and FF 3.5.2

What can be done about this problem. With so many users having this problem, surely it is a job for the Joomla developers. Come on guys help us out here.

maxmedia
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Aug 31, 2009 4:46 pm

Re: invalid token during logging in

Postby maxmedia » Mon Aug 31, 2009 4:58 pm

Maybe I found a verry dirty hack.

In component/com_user/controller.php:

We can replace:

Code: Select all

   
        function login()
   {
      // Check for request forgeries
                JRequest::checkToken() or jexit( 'Invalid Token' );


All i want is to get rid of the broken Invalid Token error and return the users to the index page.
Can we replace jexit with something as return?

I did this, but gives me a php error:

Code: Select all

   
        function login()
   {
      // Check for request forgeries
                JRequest::checkToken() or {
         JError::raiseError( 200, JText::_('Invalid Token') );
         return;
      }

User avatar
DKY
Joomla! Intern
Joomla! Intern
Posts: 73
Joined: Tue Aug 19, 2008 1:53 pm
Contact:

Re: invalid token during logging in

Postby DKY » Tue Sep 01, 2009 12:56 am

Would something like this work?

Code: Select all

function login()
   {
      // Check for request forgeries
                JRequest::checkToken() or header('Location: http://www.example.com/');

djcoolio
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Aug 26, 2009 5:28 pm

Re: invalid token during logging in

Postby djcoolio » Tue Sep 01, 2009 8:59 am

My "invalid token" error seems to have just disappeared, but I am still having probs logging in to my admin. When I type in details it says done, and thats it. I then have to click "back" and the "forward" in browser and it works. Also when I am in the backend It seems that I have to press refresh button to get it to accept changes

User avatar
DKY
Joomla! Intern
Joomla! Intern
Posts: 73
Joined: Tue Aug 19, 2008 1:53 pm
Contact:

Re: invalid token during logging in

Postby DKY » Tue Sep 01, 2009 12:27 pm

djcollio, did you try what I suggested above or are you talking about another solution that didn't work?

djcoolio
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Aug 26, 2009 5:28 pm

Re: invalid token during logging in

Postby djcoolio » Tue Sep 01, 2009 2:15 pm

no havent changed anything just stopped getting error but still have other problems listed above

hawkmultimedia
Joomla! Intern
Joomla! Intern
Posts: 52
Joined: Mon Sep 05, 2005 2:00 am
Location: TN
Contact:

Re: invalid token during logging in

Postby hawkmultimedia » Thu Sep 03, 2009 2:45 am

My invalid token and invalid username and password (when entered correctly!) errors seem to increase tenfold when cache is enabled. I've set the login module to never cache, but it doesn't appear to have any effect. I've tried the CssJsCompress plugin, but that only compounded the problem. At least users aren't seeing other people's session like they were before I upgraded from 1.5.9 to 1.5.14. Turning off and clearing the cache returns logins to normal.

So, now how am I supposed to speed up the site if I can't cache anything?

User avatar
sakiss
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 247
Joined: Wed Aug 20, 2008 4:09 pm

Re: invalid token during logging in

Postby sakiss » Tue Sep 08, 2009 3:41 pm

For me everything was resolved after uninstalling joomla xplorer component.

hepeiyuan
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Sun Sep 06, 2009 12:14 pm

Re: invalid token during logging in

Postby hepeiyuan » Wed Sep 16, 2009 4:20 pm

I am having this problem by using gtranslate, once translated site into another language, other page works fine, but I can not login, if I login it will says Invalid Token. any idea of what this happened?

thanks

smalexmar
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Sep 23, 2009 6:04 am

Re: invalid token during logging in

Postby smalexmar » Wed Sep 23, 2009 6:14 am

Here's what I have found:

I checked the token generated on the login page. Adjusted the controller to show me what the token is after the Invalid Token message and voila it is different, no surprise here. What I did find interesting was after I clicked login the first time and it returned to the login screen as if nothing had actually happened, When I checked the source on the page to see if the token had changed, to my surprise, the code actually shows that I was logged in inspite of the fact that on the page infront of me I was still seeing the username & password fields. So as faulty as I.E is...i tried it in I.E and it worked on the first try...No Invalid Token...I was using firefox...hope this gives some direction on the problem, I would like someone more experienced to check this out and post their findings here....PLEASSSSSSE

smalexmar
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Sep 23, 2009 6:04 am

Re: invalid token during logging in

Postby smalexmar » Thu Sep 24, 2009 2:14 pm

Additionally, I turned of the apache mod rewrite and in view of the page code reflecting that I was actually logged in but the page still showed the username and password, I set the options in the login module to redirect the user to the home page at login and to the home page on logout...i.e instead of leaving the blank, I set where i want it to go instead of it just returning to the parent...hence in the controller

effrit1
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Wed Apr 08, 2009 5:47 am

Re: invalid token during logging in

Postby effrit1 » Tue Oct 20, 2009 10:15 am

hi all
i find "invalid token" problem then use one plugin with motools.
so i start experiment with system and find some actions what solve my problem.

first- i deactivate "use cash" option in my site. so the problem is desapeared.
but its no good to site if there are many visitirs came.

so i find next actions to solve my problem
a) i activate "use cash" option in "site"-"preference" menu
b) i activate PLUGIN System-Cash in "extensions-plugins" sections.
(this plugin have 2 states in preference "use/no use browser cash" so try both of it)

ps
method with active plugin have some bugs-so check it out

and now seems it works.
it will be cool if this post will help somebody so give it a try :)
best regards from Russia and sorry for my English :)

MrChuck
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Nov 06, 2009 11:51 am

Re: invalid token during logging in

Postby MrChuck » Fri Nov 06, 2009 12:11 pm

Hi All,

I'm trying to help out a mate who is also seeing the 'Invalid Token' problem. He is using version 1.5.14 and also the rocket afterburner extension. I have been reviewing the !hundreds! of posts on this topic in these forums and elsewhere and it looks like a severe, and ongoing issue. Looks to me also like it's definitely not as fixed as the dev team seems to think...

We have tried various combinations of cache settings both on the browser (ff 3.5.4) and on the site and still getting it randomly from time to time. If there is a known solution out there, I'd love to know it--and so would my friend, his users are screaming.

Does anybody know what is _really_ causing this problem?

One more piece of info: the login routines in jom_social do not seem to have this problem ever--he has that linked in his site as well, and he is using it is a workaround. I have suggested to him that he hides the other login page until the Invalid Token issue is fixed.

MrChuck

bobbytuck
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Mon Nov 16, 2009 3:02 pm

Re: invalid token during logging in

Postby bobbytuck » Mon Nov 16, 2009 3:06 pm

Yes -- a severe error. I've upgraded to 1.5.15 and am seeing it more and more -- especially with Firefox.

I've waded through *tons* of posts (assuming this to be an easy fix) -- but apparently there are as many fixes as people having problems.

Definitely not fixed -- and is so annoying that I've disabled logging altogether.

Yes, I am not caching.

Yes, I've double-checked the form "hidden" fix on the PHP login page.

Will this be fixed?

prilly
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 198
Joined: Thu Feb 26, 2009 11:09 am

Re: invalid token during logging in

Postby prilly » Mon Nov 16, 2009 7:07 pm

Yes, this is possibly the stupidest problem that Joomla has. I've noticed invalid token errors on my sites, and on other Joomla sites that I visit. I thought the invalid token errors were gone... but they're BACK. I'm not trying to fix it anymore. I think Joomla needs to fix it.

Makes me wonder if I should learn Drupal or something else.

Personally, I think it has something to do with javascript apps such as mootols or jquery or highslide. I've been extremely careful to keep any javascript off my main site and I'm not getting invalid token errors there. But I set up a new Joomla website recently and it has the invalid token errors.

I figure it's one of the modules that's doing it but I don't know which one. I have a subscribe to Get Response newsletter module, a translation module, a PayPal donate module and a Today's date module, along with the regular menu module. Standard Joomla login, nothing fancy. I think it's one of those that's causing token errors.

hlarledge
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Tue Nov 03, 2009 6:39 pm

Re: invalid token during logging in

Postby hlarledge » Tue Nov 17, 2009 8:16 pm

What is the status on this?

prilly
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 198
Joined: Thu Feb 26, 2009 11:09 am

Re: invalid token during logging in

Postby prilly » Tue Nov 17, 2009 9:00 pm

I wonder if they are aware that the problem has increased.

Maybe some old code snuck back into the system. Maybe they should be aware of this.

a13wes
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Tue Sep 15, 2009 2:18 pm

Re: invalid token during logging in

Postby a13wes » Mon Nov 30, 2009 11:53 pm

I am also having this problem. I created a site, it was working fine 2 weeks ago, however I can now log into the back end, but a few clicks I get thrown back to the login page. Then when I put in my details again it says invalid token.

I hope someone can help shed some light on this problem fast!
???

efiplus
Joomla! Apprentice
Joomla! Apprentice
Posts: 45
Joined: Fri Jun 22, 2007 5:44 pm
Contact:

Re: invalid token during logging in

Postby efiplus » Thu Dec 03, 2009 6:14 pm

This certainly asks for an urgent fix :(
Out of the blue, we started getting the invalid token error when SAVING an article.
The article is added to the DB, but is terribly annoying to get this white screen of death every time and then be sent to the backed dashboard.
Running 1.5.15 in both sites.
Tried all the known cache and cookies recipes.

Joomla 1.5.16 to fix this, anyone?
Professional Opensource Services
http://www.efiplus.com

falc
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Mar 14, 2009 3:20 pm

Re: invalid token during logging in

Postby falc » Thu Dec 03, 2009 7:14 pm

the guys from joomla need to fix it .... it's been months that i have this bug!!!!

a13wes
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Tue Sep 15, 2009 2:18 pm

Re: invalid token during logging in

Postby a13wes » Fri Dec 04, 2009 12:03 am

I've downloaded the latest version of Joomla and started again, yet straight away I click into the main menu, click to edit a menu item and I get kicked straight back to the admin login.

I am currently using Namesco and have tried reverting a recent change to PHP5 back to PHP4 to no avail. I am also on a mac, trying it in both safari and firefox. (Not sure if these are familar conditions to other people who are having problems?)


Return to “Templates for Joomla! 1.5”

Who is online

Users browsing this forum: No registered users and 12 guests