MyBB Community Forums

Full Version: Authorization code mismatch
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
If I try to subscribe on a forum / thread I get an error message: Authorization code mismatch. Are you accessing this function correctly.

Although I managed to manually go around it by adding the missing $my_post_key to the cmd line, how can I fix this?

Here is the URL to my forum:
http://goo.gl/Em664

I believe this problem has existed since the last MyBB upgrade I completed. I am not sure where to begin to address the issue and eventually resolve it.
Have you checked all templates for changes/updated templates?
Thank you for the quick reply!

I am not sure I understand the correct procedure regarding the templates and upgrading.

If I understand correctly, some templates have a Diff Report that shows green and pink highlighting indicating that changes may be needed. I reverted some templates, and I had to make various changes to get my theme to appear as it did before the upgrade.

Other templates may still require changes, and it would be helpful to know exactly which templates I would need to focus on in order to solve the issue.
The mismatch tends to appear on pages where you have not updated the templates where there are checks for the users identity. Off the top of my head, it is the showthread and forumdisplay threadlist where most of these occur.

Look for this code :

<div style="float: right;">
				<span class="smalltext"><strong><a href="misc.php?action=markread&amp;fid={$fid}{$post_code_string}">{$lang->markforum_read}</a> | <a href="usercp2.php?action={$add_remove_subscription}subscription&amp;type=forum&amp;fid={$fid}&amp;my_post_key={$mybb->post_code}">{$add_remove_subscription_text}</a>{$clearstoredpass}</strong></span>
			</div>
Exactly as Leefish said, your theme appears to have outdated templates. Updating them will solve this issue. The easiest thing to do is run the "check for updated templates" tool via ACP > Templates & Style > Templates > Find Updated Templates
Yes Euantor, but if he has a custom theme and hits revert it might "break" the theme. This is the OP's concern.

@ OP - you need to do as Euantor says, and in the templates that require updating look to see what the difference IS. Depending on the age of the theme templates there is a faint possibility of a security issue (nothing major) and it really needs to be fixed.

You are looking for the templates where the post_key variable has been changed and then you can try and manually edit.
Sorry for bumping an old thread, but how does one use the "Find updated template" tool to actually, well, update a template to the latest version?
Easiest way is to revert the template to default.
I don't understand? I'm experiencing the same issue as this thread (tried Googling my troubles away) - won't reverting the template to default cancel out all the little changes I did in the past? How would reverting the template to default constitute updating it?