Results 1 to 4 of 4

Thread: Disable token for 1 module

  1. #1

    Default Disable token for 1 module

    Hi,

    I am wondering if it possible to disable the tokens for 1 module.
    I've tried to add $GLOBALS['TL_CONFIG']['disableRefererCheck'] = true;
    inside my class but it is not working.

    The problem is that I have a select box with triggers an ajax call. When changing the select box, different content is displayed. The problem when changing the selebox (submitting more than 1 time), that the token doesn't change because the page is not reloaded. I don't want to disable the token for the whole website.

    Thanx for the answer.

  2. #2
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,287

    Default Re: Disable token for 1 module

    Hi,

    have you made the necessary changes for Ajax calls regarding the new Request Token System: http://www.contao.org/news/items/contao-2_10_RC1.html ?
    Contao Community Moderator
    → Support options

  3. #3

    Default Re: Disable token for 1 module

    Yes, but I can't use tokens as I need to submit the form with ajax several times on the same page without reloading (so without refreshing the token).
    I am searching how to disable tokens for 1 form, not for the whole website.

    thx

  4. #4

    Default Re: Disable token for 1 module

    Ok, I found out myself. You need to refresh the token every time after an ajax call

    For people interested:
    $$('input[name=REQUEST_TOKEN]').each(function(el) {
    el.value=output.token;
    });

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •