Closed GoogleCodeExporter closed 9 years ago
This has been fixed quite some time ago in r2728.
Original comment by rojaro@gmail.com
on 29 Apr 2011 at 9:33
Hi, rojaro and thanks for answering this issue. I also ran into the same
problem and I think this issue could be different than the one fixed in r2728.
Let's take a look at
/trunk/framework/Web/Javascripts/source/prado/activefileupload/activefileupload.
js
line 41 which is : this.form.action +=
'?TActiveFileUpload_InputId='+this.options.inputID+'&TActiveFileUpload_TargetId=
'+this.options.targetID;
This means no matter what this.form.action is before that line, it will be
appended with '?...'
In the case this.form.action value is something like 'index.php?page=MyPage' ,
after line 41, this.form.action will be
'index.php?page=TestPage?TActiveFileUpload_InputId=...&TActiveFileUpload_TargetI
d=...' => requested page would be 'TestPage?TActiveFileUpload_InputId' which
cannot be found.
The solution which fixed my app. is :
line 41: this.form.action += (this.form.action.indexOf('?')>0 ?'&'
:'?')+'TActiveFileUpload_InputId='+this.options.inputID+'&TActiveFileUpload_Targ
etId='+this.options.targetID;
Thanks again and I hope you'll find this useful. If something isn't clear
enough or you need more info about this scenario, please let me know.
Original comment by petre.an...@gmail.com
on 2 May 2011 at 7:59
Nice find :)
Properly fixed now in r2897.
Thanks for your report & greetings from Hamburg / Germany
- rojaro -
Original comment by rojaro@gmail.com
on 2 May 2011 at 8:15
Original comment by rojaro@gmail.com
on 2 May 2011 at 8:15
Thanks for reading it and I'm happy to be of help :)
And greetings from Bucharest / Romania :)
Anditza
Original comment by petre.an...@gmail.com
on 2 May 2011 at 8:34
I'm not exactly sure whether this can cause any issues in real world (ie.
whether the form.action field can be equal to just the query part of an url at
any times), but the semantically correct version of the check
this.form.action += (this.form.action.indexOf('?')>0 ? '&' : '?')+'TActiveFileUpload_InputId='+this.options.inputID+'&TActiveFileUpload_TargetId='+this.options.targetID;
is actually
this.form.action += (this.form.action.indexOf('?')>=0 ? '&' : '?')+'TActiveFileUpload_InputId='+this.options.inputID+'&TActiveFileUpload_TargetId='+this.options.targetID;
or
this.form.action += (this.form.action.indexOf('?')!=-1 ? '&' : '?')+'TActiveFileUpload_InputId='+this.options.inputID+'&TActiveFileUpload_TargetId='+this.options.targetID;
as string.indexOf() returns -1 if the substring is not found, not 0 or false.
Original comment by google...@pcforum.hu
on 30 Jul 2011 at 7:17
The string.indexOf() fix has been committed as r3027, thank you
Original comment by ctrlal...@gmail.com
on 19 Aug 2011 at 1:46
Original issue reported on code.google.com by
foravi...@gmail.com
on 14 Jan 2011 at 10:17