Currently Textpattern's asynchronous forms and links do not take into account
JavaScript initialization delay or other block causes.
Please see this topic posted by gilest:
http://forum.textpattern.com/viewtopic.php?id=38330
A async link or form can be interacted before JavaScript is ready. When this
happens and user interacts with such element before the async code is attached
properly, well, things break.
On the Write panel this means that the user is taken to the script response
page.
To simulate the problem:
1. Unlink async callback hook from Write panel's form.
2. Click submit.
3. You are taken to the response script.
That's what users are pound to see from time to time in real world use.
Remedying this issue can be bit hard. I may suggest:
1. Hiding all async forms (or all forms) until JavaScript is initialized.
2. Making forms loop back until JavaScript is initialized.
3. Hiding submit button until initialized (note that this doesn't prevent
sending).
4. Making sure that there is always non-async code path available.
I personally would favor 1 and 3 over options 2/4. Both 2/4 are nasty and
require a lot of code from PHP. For instance it means that each plugin and core
panel needs to provide two code paths.
Original issue reported on code.google.com by jukka.svahn@rahinaa.biz on 19 Jul 2012 at 10:34
Original issue reported on code.google.com by
jukka.svahn@rahinaa.biz
on 19 Jul 2012 at 10:34