1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Form submission problem _xfToken is an array?

Discussion in 'Troubleshooting and Problems' started by Erik P., Aug 22, 2014.

  1. Erik P.

    Erik P. Member

    I'm having a problem submitting forms in the admin site. For some reason I have yet to figure out, JS POSTed forms are being posted with an array of duplicate csrf tokens. print_r($_POST) right at top of admin.php dumps this in the browser JS console:

        [_xfToken] => Array
                [0] => 1,...,...
                [1] => 1,...,...
        [_xfRequestUri] => /forums/admin.php?styles/default-style.1/edit
        [_xfNoRedirect] => 1
        [_xfResponseType] => json
    I'm 100% sure this is an artifact related to my server environment but I'm not sure what is causing this. Any past experience with something similar would be appreciated.
  2. Erik P.

    Erik P. Member

    It's not just in the admin, this is happening on the user side as well, seems limited to javascript form submission as far as I can tell.
  3. Erik P.

    Erik P. Member

    I'm still pretty sure this is my fault but I commented out this line in xenforo.js and my _xfToken array problem goes away:

    // XenForo._csrfToken&&(b=XenForo.ajaxDataPush(b,"_xfToken",XenForo._csrfToken));
    The templates already have a hidden field for the csrf token and this bit of JS adds another.

    I'm not calling this a bug in 1.4b3 because my system config is weird. Any explanation of what is going on there would be great.
  4. Erik P.

    Erik P. Member

    Ok so now all the other AJAX is broken, obviously...Still fishing

Share This Page