Domanda

im having some issues regarding to a survey module on this website:

www.madridactual.es -> You can find the survey at the middle right of the home page.

The problem is that sometimes when you vote you may get an Invalid Token. I have the cache desactivated and still get these issues.

What could be the problem?

Thank in advances for your help!

È stato utile?

Soluzione

Sometimes the form doesn't work means there can only be two causes.

1) session expiring, which is very unlikely since it takes 15 minutes before it expires. Also I don't think you need sessions to pass the token back and forth (it's a hidden field).

2) the cache. You say you have cache disabled (I assume in the global configuration-system tab); did you disable the cache plugin as well?

If this is the case (disabling the cache plugin works) then most likely your survey component is not injecting the Token properly: Joomla cache takes care of updating tokens for us! But if the token is rewritten or inserted in a get call (or an ajax form) it will not be updated. That is a design issue and it's the responbility of the extension developer. It can be easily addressed leaving the token in its standard <input and handling it with javascript on the client side to inject its name/value into the ajax call.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top