We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2611
    • 394 Posts
    Is there an easy way to add this variable in javascript?

    When i do a custom ajax request to a connector can i set this request variable
    through some predefined way?

    I can see that in the manager, this happens automaticly but what about the front-end?

    Thanks in advance
      Follow me on twitter: @b03tz
      Follow SCHERP Ontwikkeling on twitter: @scherpontwikkel
      CodeMaster
      • 38436
      • 3 Posts
      I had trouble with this in Modx Revolution 2.2.2-pl and found that the key generated by $modx->site_id didn't match HTTP_MODAUTH passed by modx's default ajax calls.

      So I swapped out
      $this->modx->site_id 

      with
      $this->modx->user->getUserToken($this->modx->context->get('key'))


      in my index.class.php which fixed the problem