News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

"Token verification failed. Please go back and try again."

Started by Leto Atreides II, October 01, 2023, 08:14:51 AM

Previous topic - Next topic

Leto Atreides II

I'm installing a new 2.1 SMF forum (this is completely separate from the 2.0 I'm trying to resuscitate), and I've been getting "Token verification failed. Please go back and try again" messages. Last night I was getting them when I tried to activate new theme templates I'd uploaded. I gave up and went to bed; this morning I tried again, and the new theme activated without a hitch. "Whew, that token nonsense is over," I thought, and proceeded to try creating new categories and boards. But my first attempt to create a category resulted in the same token verification failure message!!! I mean what is a token even, I'm not trying to ride the bus, watch a movie or play an arcade game! Yeeeaaaarghhhh!

Site being created: http://futharc.com/

Doug Heffernan

Quote from: Leto Atreides II on October 01, 2023, 08:14:51 AMLast night I was getting them when I tried to activate new theme templates

Those themes that you installed, are they compatible with Smf 2.1.x?

Leto Atreides II

Quote from: Doug Heffernan on October 01, 2023, 09:12:45 AM
Quote from: Leto Atreides II on October 01, 2023, 08:14:51 AMLast night I was getting them when I tried to activate new theme templates

Those themes that you installed, are they compatible with Smf 2.1.x?
Heh. The first five I tried to upload last night weren't. I deleted them and ran a search, and uploaded four that were. But this morning... token verification failure blues!

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sesquipedalian

The most common cause of token verification failures is hitting the browser's refresh button when submitting certain forms in the admin centre, or trying to use the browser's forward and back buttons to step through a process where you submitted those forms.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Leto Atreides II

Quote from: Kindred on October 01, 2023, 03:37:23 PMwww vs non www, I bet
How do I address this? I checked and there's no www in front of futharc.com. Is there a way I can change this?

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Leto Atreides II

Quote from: Kindred on October 01, 2023, 04:58:47 PMAre you using www to access your site?

Ooohhhh.... my home page has the link as www.futharc.com. Could that be causing the problem? But wouldn't adding www to the actual website be an improvement?

Leto Atreides II

Well, I just went to the forum, made sure I didn't have www in the address bar, logged in as admin, and successfully created a new category.... so it looks like you've pointed me in the right direction!

Leto Atreides II

... Then I go to make a second category, and get the token verification failed message again..... Argh.

Illori

what steps did you take to make the second category? did you hit the back button in your browser or?

Kindred

What you need is consistency.

If you don't use www, then ALL your URLs in the forum settings should be without... and you should add a forced redirect in htaccess to send everyone there.

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Leto Atreides II

Quote from: Illori on October 01, 2023, 07:17:15 PMwhat steps did you take to make the second category? did you hit the back button in your browser or?
Never hit the back button once. I seldom have use for it.
Quote from: Kindred on October 01, 2023, 07:37:44 PMWhat you need is consistency.

If you don't use www, then ALL your URLs in the forum settings should be without... and you should add a forced redirect in htaccess to send everyone there.
Is there a way for me to add the www where it isn't currently being used? I realize this is a webdesigning issue rather than an SMF one, but I'm guessing it's a fairly straightforward thing to accomplish.

Incidentally, I got the "Token verification failed. Please go back and try again" message again... but on THIS forum... the first time I tried to upload my new avatar.

Leto Atreides II

I did find these directions:

QuoteAdding the www prefix to domain URLs

You can automatically add the www prefix to your domain's URLs by using Apache rewrite rules in a custom .htaccess file. To do this, follow these steps:

Create an .htaccess file in your public_html directory. If you already have an .htaccess file in the public_html directory, you can modify it.

Copy and paste the following lines of text into the .htaccess file:

# Add www to any URLs that do not have them:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

Save the .htaccess file.

To test the configuration, use your web browser to visit http://example.com, where example.com represents your domain name. The browser should be redirected to http://www.example.com.

It seems Apache specific, but according to http://wp14.org/phpinfo.php , my host does use Apache. Should I try this?

shawnb61

Do you have multiple tabs open while you work?

If so, that can create token issues.

Tokens help ensure folks don't steal admin update capabilities, eg, via back tabbing.  If you have multiple tabs open, the other tab can update the token, rendering your other tab's token stale.

When doing admin tasks, especially repetitive ones, stick to one tab & window. 
A question worth asking is born in experience & driven by necessity. - Fripp

Kindred

Leto ---   What URL is your forum configured to use in your SMF server settings?

if it is WITHOUT WWW - then go ahead and leave it alone, and set the htaccess redirect to bounce people to the URL without www.     
If you have it set WITH WWW in your SMF settings - then go ahead and leave it alone, and set the htaccess redirect to bounce people to the URL with www.     
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Leto Atreides II

Quote from: Kindred on October 02, 2023, 12:37:24 PMLeto ---   What URL is your forum configured to use in your SMF server settings?

if it is WITHOUT WWW - then go ahead and leave it alone, and set the htaccess redirect to bounce people to the URL without www.     
If you have it set WITH WWW in your SMF settings - then go ahead and leave it alone, and set the htaccess redirect to bounce people to the URL with www.     

I looked under "Server Settings" and there under "PHP Info" and found this:

QuoteEnvironment   
PATH   /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
DOCUMENT_ROOT   /home/www/wp14.org
SCRIPT_NAME   /index.php
SCRIPT_FILENAME   /home/www/wp14.org/index.php

If that's the right place to look - it seems it is set to use www?

Leto Atreides II

Quote from: shawnb61 on October 01, 2023, 09:37:23 PMDo you have multiple tabs open while you work?

If so, that can create token issues.

Tokens help ensure folks don't steal admin update capabilities, eg, via back tabbing.  If you have multiple tabs open, the other tab can update the token, rendering your other tab's token stale.

When doing admin tasks, especially repetitive ones, stick to one tab & window. 

I usually do have multiple tabs open. But I just tried it with a single tab. Same problem; so that doesn't seem to be the cause here.

Kindred

no....    that's the DIRECTORY, not the URL...

either I am confused, or the devs removed some of the settings.

Please run repair_settings.php (or look in Settings.php) and let me know what your boardurl and scripturl is set to....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Leto Atreides II

Quote from: Kindred on October 05, 2023, 01:26:52 PMno....    that's the DIRECTORY, not the URL...

either I am confused, or the devs removed some of the settings.

Please run repair_settings.php (or look in Settings.php) and let me know what your boardurl and scripturl is set to....

OK, here's what repair_settings shows me:



Looking in Settings.php I find:

########## Directories/Files ##########
# Note: These directories do not have to be changed unless you move things.
/**
 * The absolute path to the forum's folder. (not just '.'!)
 *
 * @var string
 */
$boarddir = '/home/www/futharc.com';


Advertisement: