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.
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 ?
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
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;
});