Dammina,
Have you tried just not including the DIV element with the form token? Just
having a quick look at other templates, I am not sure there is another page
that includes this as part of the template and checking with a debugger at
around line 203 of trac/web/main.py I see that req.args.get('__FORM_TOKEN')
is returning a list of two items instead of a single string.
Hope this helps!
Cheers,
Gary
On 13 June 2014 21:10, Gary Martin <[email protected]> wrote:
> It seems that in my haste earlier I only sent this to Dammina. I also
> noted that the form shared an id with the quick ticket form on the page in
> question but I don't yet know if this has anything to do with the behaviour
> described. I'll have a look shortly but if anyone has some better advice,
> that would be great!
>
> Cheers,
> Gary
>
>
> On 13 June 2014 11:14, Gary Martin <[email protected]> wrote:
>
>> Hi Dammina,
>>
>> I won't be able to look at this until this evening so I hope that someone
>> else will be able to help out with this. In the mean time, if other forms
>> do not also display this problem, I would probably put some debug points in
>> the python code that processes the views to see if I could spot any
>> obviously significant differences. Without checking, I am assuming that the
>> form token should be part of the data received.
>>
>> Anyway, as I said, I'll have a proper look later.
>>
>> Cheers,
>> Gary
>>
>>
>> On 13 June 2014 09:09, Dammina Sahabandu <[email protected]> wrote:
>>
>>> Hi All,
>>> I'm trying to implement a feature which will provide the functionality
>>> to users to create multiple tickets at once. As the QuickCreateTicketDialog
>>> component is some what similar I'm trying to extend its functionality to
>>> post the parameters to the backend DB. The thing is while I'm trying to
>>> submit the input form it gives me the error saying; "Error: Bad Request
>>> Missing
>>> or invalid form token. Do you have cookies enabled?"
>>> I have used the same value for the input __FORM_TOKEN which have been
>>> used for the Quick Create Ticket component. I have also tried removing that
>>> input from the form. Then it resulted in not hitting the match_request
>>> method.
>>> It will be really great if you can help me on this matter.
>>>
>>> PS: As I know some other projects will be also benefited if this issue
>>> can be solved.
>>>
>>> Thanks
>>> Dammina
>>> --
>>> Dammina Sahabandu.
>>> Undergraduate Department of Computer Science and Engineering
>>> University of Moratuwa
>>> Sri Lanka.
>>>
>>