PDA

View Full Version : "Forums Read" - security token screw up


screengold
12-16-2011, 09:13 PM
Users are getting this message when they try to mark forums read from Quick Links:

"Your submission could not be processed because a security token was invalid.

If this occurred unexpectedly, please inform the administrator and describe the action you performed before you received this error."

Has anyone been here?

Cheers!

Max Taxable
12-16-2011, 10:46 PM
There's some bits of code missing from that style. What version of vBulletin are you running? Does this happen in the default style as well?

I had this quite a bit when I tried to use a style that was from a much older version of vB than I had, took me a lunation to get all the spots where this security token issue comes up, but I did get it figured out.

But to help you, I do need further information.

screengold
12-16-2011, 10:57 PM
Hi Max,

I'm using 3.8, and it doesn't happen with the default style.

Thanks for getting involved!

--------------- Added 1324079886 at 1324079886 ---------------

3.8.7 to be precise.

Max Taxable
12-16-2011, 11:40 PM
Okay... The style you're having this happen with is missing some needed code, and vBulletin is actually nice enough to fix it for you.

On main page of adminCP there should be alerts about this, out of date style templates. You'll see links there for you to click to update these templates. This should fix the "security token" problem for you.

Can we have a link to your board, to the style that is giving you the problems so we can look at the sourcecode?

screengold
12-16-2011, 11:46 PM
Hmm, I think I reverted all templates as instructed on that admin page. Problem still seems to exist. The board is http:/www.screenwritinggoldmine.com/forum

Max Taxable
12-17-2011, 12:02 AM
"Not Found" error on the link you gave.

screengold
12-17-2011, 12:05 AM
Whoops. Missing an opening slash:

http://www.screenwritinggoldmine.com/forum

Max Taxable
12-17-2011, 12:06 AM
I was able to Mark Forums Read without any trouble as a visitor, I could see that part of the code was correct as well, when I checked source code. Do you have a test account I can log in to so I can try it from quick links? If so PM me the details.

Here's the code you need to have for the "Mark Forums Read" in Quick Links:

<td class="vbmenu_control"><a href="forumdisplay.php?$session[sessionurl]do=markread&amp;markreadhash=$bbuserinfo[securitytoken]" rel="nofollow">$vbphrase[mark_forums_read]</a></td>This should be in your Navbar Template.

screengold
12-17-2011, 12:16 AM
Can you see the "Quick Links" menu item as a visitor? It doesn't show for me. Are you using the black and gold template? It's the "Default Style" in the footer.

I'll set you up a test AC and pm you the pw.

Max Taxable
12-17-2011, 12:20 AM
See my edit in post #8 above for what I believe is missing code for you.


Find and replace, in NAVBAR template:

Find:<div class="vbmenu_popup" id="usercptools_menu" style="display:none;margin-top:3px" align="left">
<table cellpadding="4" cellspacing="1" border="0">

<tr><td class="thead">Quick Links</td></tr>
<tr><td class="vbmenu_option"><a href="search.php?do=getdaily">Today's Posts</a></td></tr>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?do=markread">Mark Forums Read</a></td></tr>Replace with:<div class="vbmenu_popup" id="usercptools_menu" style="display:none;margin-top:3px" align="left">
<table cellpadding="4" cellspacing="1" border="0">

<tr><td class="thead">Quick Links</td></tr>
<tr><td class="vbmenu_option"><a href="search.php?do=getdaily">Today's Posts</a></td></tr>
<td class="vbmenu_control"><a href="forumdisplay.php?$session[sessionurl]do=markread&amp;markreadhash=$bbuserinfo[securitytoken]" rel="nofollow">$vbphrase[mark_forums_read]</a></td></tr>

screengold
12-17-2011, 12:32 AM
Ok, thanks very much for posting all that - I think it's fixed. It seems to be working? Is it from your end?

One this is, how did this happen, do you have any ideas? It's not really the sort of damage I would have done from modifying the template file to change the Navbar.

Max Taxable
12-17-2011, 12:36 AM
Ok, thanks very much for posting all that - I think it's fixed. It seems to be working? Is it from your end?

One this is, how did this happen, do you have any ideas? It's not really the sort of damage I would have done from modifying the template file to change the Navbar.You replaced the code as I provided here, correct?

The issue is, with any style you install that was made prior to the version of vB you are using, or if you upgrade a vB3 between versions that didn't have the security token hash, this will come up.

The reversions notified of in your adminCP SHOULD have fixed this, but some styles code the Quick Links part a little different than others.

Glad you got it fixed, nice work. I like your forum too by the way, I think I'll stay!

P.S. In the code I gave you, replace:<td class="vbmenu_control"> with <td class="vbmenu_option"> to get rid of the boldface type for "Mark Forums Read."

screengold
12-17-2011, 12:50 AM
Got it. Sorted, I hope. Thanks for your help!

And yes, it's a very nice forum so stick around - be glad to have you! Do you write?

Max Taxable
12-17-2011, 12:55 AM
Got it. Sorted, I hope. Thanks for your help!

And yes, it's a very nice forum so stick around - be glad to have you! Do you write?Yes you have it fixed exactly correct now.

Journalism degree... Never used it though. But always have story ideas and such. Can I keep the test account?

screengold
12-17-2011, 01:12 AM
OK, well that's a great background for screenwriting - the journalists I know have got a great way with stories.

You can't have that account, cos (strangely enough) the name has sentimental value to me! But feel very free to set yourself up with any other new account...