View Full Version : Can't Edit - Security Token Invalid
Hello all,
Everything was working fine and only change i did today was changed my domain name. (old abc.com to new xyz.com) and after then when i try to edit any post in the forum i get this error message pop up.
Please see a screenshot of error message.
https://vborg.vbsupport.ru/external/2014/04/36.jpg
Any help will be appreciated.
Thanks.
--------------- Added 1397440535 at 1397440535 ---------------
Just some additional info. I was able to edit one of the post and once i click save i got this warning message on the top. Can someone help me with this ?
https://vborg.vbsupport.ru/external/2014/04/37.jpg
Thanks in advance.
Lynne
04-14-2014, 02:55 AM
What version of PHP and what version of vBulletin? Did you change servers or update software at all?
Max Taxable
04-14-2014, 03:03 AM
editpost.php on line 323... Go there and remove the ampersand. Edit the file with notepad++, TextEdit or other actual editor - do not use just plain notepad.
What version of PHP and what version of vBulletin? Did you change servers or update software at all?
Hi Lynne,
PHP version is 5.3.26
VB version is 4.2.2 Patch level 1.
Nope. I didn't change server nor any software update. Only change that was done was change the domain name.
--------------- Added 1397449497 at 1397449497 ---------------
editpost.php on line 323... Go there and remove the ampersand. Edit the file with notepad++, TextEdit or other actual editor - do not use just plain notepad.
In line 323 of editpost.php i have this;
$edit['emailupdate'] = array_pop($array = array_keys(fetch_emailchecked($threadinfo)));
If i am not wrong i don't see ampersand (&) in here. Any suggestion ??
Max Taxable
04-14-2014, 03:31 PM
In line 323 of editpost.php i have this;
$edit['emailupdate'] = array_pop($array = array_keys(fetch_emailchecked($threadinfo)));
If i am not wrong i don't see ampersand (&) in here. Any suggestion ??No ampersand, no edit needed.
ForceHSS
04-14-2014, 04:16 PM
Have you installed any of the fixes yet. There are many posts about them here
I have been trying to find a fix for this since from last night and i didn't find anything related to the issues i have. Can you share the links which you think can help me fixing this issue please ?
thanks.
ForceHSS
04-14-2014, 07:49 PM
https://vborg.vbsupport.ru/showpost.php?p=2480664&postcount=11
https://vborg.vbsupport.ru/showpost.php?p=2476633&postcount=2
https://vborg.vbsupport.ru/showpost.php?p=2480664&postcount=11
https://vborg.vbsupport.ru/showpost.php?p=2476633&postcount=2
Hi. U gave me 2 fix via link so when i did 1st fix which was suggested by you. It didn't resolve the issue and i still got token invalid error.
when i tried 2nd fix which was given by Richie in class_core.php it didn't work at all and when i came back on forum messed up my forum and only get this error.
https://vborg.vbsupport.ru/external/2014/04/33.jpg
Thanks.
ForceHSS
04-15-2014, 12:59 AM
And what edit program did you use to edit the file with. If you want to send me the files I can do them for you.
I used notepad++ to edit those files. Sure i can. Not sure, but can i pm you those as i have never tried to send any files here.
ForceHSS
04-15-2014, 01:09 AM
I used notepad++ to edit those files. Sure i can. Not sure, but can i pm you those as i have never tried to send any files here.
I will pm you an email address to send them too
Hi,
Thanks. I have sent you the files. Appreciate your help.
ForceHSS
04-15-2014, 01:36 AM
happy to help
Hi Force,
The files you sent me after the fix, it still didn't resolve my issue. I still get the same error.
ForceHSS
04-15-2014, 03:58 AM
Please disable all plugins on your board and tell us if the problem persists.
To do this, edit your vBulletin config.php file currently on the server by adding the following line after the <?php line:
PHP Code:
define('DISABLE_HOOKS', true);
Then reupload the config.php file into your forum's includes folder.
Them fixes I gave you should of fixed the problem if the above does not work will give you something to put in your config to turn the warnings off
Hi Force,
I have already tried this before where i disabled all plugins from config.php, but since i updated the files with your fix so thought to give another try and i just disabled all plugins again from config.php and when i tried to edit post got the same pop up error.
BTW i was also checking with my host to see if they have done anything wrong during the domain name change and this is what thery said;
Since your domain name is change all associated system data will be updated with the new domain name. But the internal links in your script/application won't change, if it's using URLs containing the old domain name it might cause this type of issue. I would suggest taking a database backup in sql format, replace all instances of old domain in it with the new domain name and restore it. It should help to resolve this issue.
You may want to discuss this with your developer as well.
Can this be a possibility ?? All my URL's are working with new domain nothing runs on old domain though.
Max Taxable
04-15-2014, 04:45 AM
How many browsers have you tried this with?
The first step in troubleshooting is to duplicate the problem from other sources and places.
Clear your cache.
Try other browsers.
Re-assert your credentials.
ForceHSS
04-15-2014, 04:50 AM
check info in htaccess file some things might need changed as you seem to have a new domain name
How many browsers have you tried this with?
The first step in troubleshooting is to duplicate the problem from other sources and places.
Clear your cache.
Try other browsers.
Re-assert your credentials.
I have tried chrome & IE. In chrome i get pop up error and in IE when i try to edit post and click on EDIT POST, it just refreshes the page and nothing else.
--------------- Added 1397542494 at 1397542494 ---------------
check info in htaccess file some things might need changed as you seem to have a new domain name
Hi Force,
Just checked my .htaccess and nothing needs update i believe. There is nothing related to domain which can cause any of this.
Thanks.
ForceHSS
04-15-2014, 02:13 PM
Time for you to get a coder in to help you post in paid section might be the next option
Hmmm ... I am not sure if i am suppose to put different site links here or not, but someone suggested me this fix. Can this be helpful in my case ??
http://www.theadminzone.com/forums/showthread.php?t=71097
sorry if i am not suppose to put links like this :(
cellarius
04-15-2014, 07:48 PM
That link is not a problem, but it is not likely that the suggestions there will help you. Since you say that you were running your forum ok and only changed the domain, it is highly unlikely that you're missing the token line in a template. But of course there's no hurt in trying.
ForceHSS
04-15-2014, 08:22 PM
Check the template if the line is missing then add it
Hi guys,
I just wanted to say thanks for all the help. Issue has been resolved :) Appreciate your help.
ForceHSS
04-16-2014, 02:28 AM
Hi guys,
I just wanted to say thanks for all the help. The issue has been resolved :) Appreciate your help.
If you can post how it was fixed so if others looking here for an answer they will get it. I know how myself, but it's just for others.
Snap !! I had to reply at different post and i put the detail answer over there whereas i wanted it to be here :)
Well first thanks to ForceHSS ...
Solution for this was suggested by him, which was install a unmodded default style. How you do that is as follows;
Go to Styles & Templates/Style Manager at the bottom you will see a link that says [Add New Style] it will open a new window
Parent Style = No Parent Style
Title = put whatever you want
Allow User Selection = No as this is only a test members don't need to see it
Display Order = 1
Then after that issue was gone. After that i deleted all custom styles and re installed them and now i don't even have issue in them either and hopefully it won't come back again :D
Once again thanks to all who helped and special thanks to Force for helping me solving this issue.
Hi Force/All,
It's very weird, but few hours back i start getting this error again. I didn't get it after the above fix which was like 3 days ago and few hours back i start getting this error all over again. Can anyone help why it would happen ??
ForceHSS
04-18-2014, 04:14 PM
Think its time you post a link to your site or post in paid section to get this problem fixed once and for all. Posting in paid would be your best option
Hi Force,
I figured it out. Now i know what the issue is, but not sure why it would cause all this. My thanks still stand for you because if it wasn't you i was never gonna figure this out.
So today i did the same thing which i did last time except last time i made so many changes that i lost track, but today that was the latest change i made and it got messed up.
Here is why it's happening.
my old site name (as an example) was abc.com and now i changed it to xyz.com so i thought i should change abc.com to xyz.com on my forum by going to
Style & Templates > Replacement Variable Manager and in each style i did search text and replace text with so search for abc & replace with xyz.
Now that would change all abc.com to xyz.com, but it start giving me errors about security token invalid.
At this point if you think or u know why it can happen then i will love to get that fix or else i will just leave it the way it is.
Once again thanks for ur help because if u would've not suggest me the first solution i would've never thought about all this and keeping track of changes. :)
ForceHSS
04-18-2014, 07:08 PM
It's good you fixed it but if you installed the new styles ie default and removed the old ones that I thought you said you did, you should not be having this problem again. So did you reinstall one of the old styles again?
Nopz. Like i said i did same thing last time and i had this issue when u suggested remove all styles i did that when i removed all styles it removed all replacement variables as well. After that i didn't change it to xyz from abc and it was working fine, but when i made the replacement variable change again today i start getting the same error again.
Lynne
04-18-2014, 08:20 PM
Why are you using a replacement variable to change your domain name? You should change it in AdminCP > Settings > Options > Site Name/URL/etc > Forum URL. And, I would suggest using the search/replace in the templates if you need to change it in the templates (backup your style prior to doing this).
Lynne,
No i wasn't trying to change domain name in replacement variables. I was doing that to replace my old domain name ( like wherever in posts/threads it would say my old site name will change to new site name. like a thread says we at abc forum do care about copy rights laws & regulations and it should get changed to we at xyz forum do ...... ) I think i will try the second option u just suggested and see how it goes.
Thanks :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.