Reply To: Error: A variable mismatch has been detected.
I had this reply @robin-w:
I’d suggest filing a bug report with bbPress.
The issue is that TML registers ‘action’ as a public query variable with WP. WP has a check in WP::parse_request(), which ensures that all GET and POST values of public query variables match. If they don’t, it dies with the error message you are seeing.
For whatever reason, bbPress uses a different action key depending on GET/POST context. In this specific instance, the GET value of ‘action’ is ‘split’. However, the POST value (set via hidden field in the form) is ‘bbp-split-topic’. This difference is causing the condition described above.
In code:
$_GET['action'] = 'split'; $_POST['action'] = 'bbp-split-topic'; if ( isset( $_GET[ 'action' ] ) && isset( $_POST[ 'action' ] ) && $_GET[ 'action' ] !== $_POST[ 'action ] ) { wp_die( __( 'A variable mismatch has been detected.' ), __( 'Sorry, you are not allowed to view this item.' ), 400 ); }