• Resolved Chuckie

    (@ajtruckle)


    I have done some thorough testing and isolated an issue that I have with bbPress when Theme My Login is activated.

    Specifically when I try to use the Split feature to split a topic into two is when this error is encountered:

    Error: A variable mismatch has been detected.

    If I disable Theme My Login the split procedure works.

    How can we resolve this? Thank you.

    I am using latest versions of bbPress and WordPress.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    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 );
    }
    
    Thread Starter Chuckie

    (@ajtruckle)

    Thread Starter Chuckie

    (@ajtruckle)

    Based on your excellent response someone was able to provide me with some code to resolve the issue. Thank you ever so much.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error: A variable mismatch has been detected.’ is closed to new replies.