mfw when the right answer from Wombat has -3
Sorry for not commenting but I don't have any repo here yet and am really just wondering what's going on on wordpress.stackexchange.com
What exactly should Wombat add to this? We have a WP installation with some old code (meanwhile codex should be correct for the current WP version) from codex.wordpress.com in our Theme's functions.php
file to customize the password form for example like this:
<?php
function my_password_form() {
global $post;
$label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID );
$o = '<form action="' . esc_url( site_url( 'wp-pass.php', 'login_post' ) ) . '" method="post">
' . __( "To view this protected post, enter the password below:" ) . '
<label for="' . $label . '">' . __( "Password:" ) . ' </label><input name="post_password" id="' . $label . '" type="password" size="20" maxlength="20" /><input type="submit" name="Submit" value="' . esc_attr__( "Submit" ) . '" />
</form>
';
return $o;
}
add_filter( 'the_password_form', 'my_password_form' );
?>
On some update WP changed the form but as we overwrite it with our filter in our functions.php
we now get the error described by the OP after the update in question. And now we change wp-pass.php
to /wp-login.php?action=postpass
just like Wombat said (and like shown on the current codex page) like this:
<?php
function my_password_form() {
global $post;
$label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID );
$o = '<form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" method="post">
' . __( "To view this protected post, enter the password below:" ) . '
<label for="' . $label . '">' . __( "Password:" ) . ' </label><input name="post_password" id="' . $label . '" type="password" size="20" maxlength="20" /><input type="submit" name="Submit" value="' . esc_attr__( "Submit" ) . '" />
</form>
';
return $o;
}
add_filter( 'the_password_form', 'my_password_form' );
?>
Problem solved.
(For anyone who already implemented a custom filter which caused this problem this should be no problem with the information Wombat provided... so why the heck do you guys down rate him??)
Referer
header?wp-pass.php
:wp_safe_redirect(wp_get_referer());
If your browser does not send a Referer you might get problems. Your browser offers a debugger where you can see the network communication.