Getting "The form has become outdated" error I have a multistep node form.
Half way through the form through a popup dialog user is asked to login if they have not logged in prior.

Upon successful login when proceeding with next page of the node form, I get this validation error:


  The form has become outdated. Copy any unsaved work in the form below and then reload this page.


I understand it is because drupal_validation_form() verifies $form['#token'] and $form_state['values']['form_token'] are the same.

How do I avoid this, as this is a special use case (and it's not forgery by some external stuffs).

Any input on this front?
Your post just saved me from serious misery. Don't quite know how that connection was made but your post lead me to a small change in my module code. Easy to understand why the "The form has become outdated" error was occurring now though. So see if this might jog your thoughts and help for your case.

My page admin/mymod had a menu item set up that included the following.

'page callback' =&gt; 'drupal_get_form', 
'page arguments' =&gt; 'mymod_main',


In mymod_main($op = '') I am conditionally building one of 2 forms but each build is of course a new form, e.g. $build['mymod_admin'] = drupal_get_form('mymod_admin') or $build['mymod_delete'] = drupal_get_form('mymod_delete').

No problem when the page admin/mymod first loaded and mymod_admin is called. But when the submit button created in mymod_admin is clicked then mymod_delete is called and creates it's form. There comes the "The form has become outdated" error that ruined the form processing. The fix is simply to use mymod_main() as page callback.

Now there is no crossing up of forms when the admin/mymod page reloads for each of the forms as there is not a starting form from the manu callback and then the second form defined in $build.