Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2245 (closed defect: fixed)

Opened 10 years ago

Last modified 10 years ago

Params passed as None even if defined when mixing POST request with urlencoded params

Reported by: amol Owned by:
Priority: high Milestone: 2.0final
Component: TurboGears Version: 2.0b6
Severity: normal Keywords: pylons
Cc:

Description

I have prepared this simple app to replicate the problem. It uses tw.jquery to load data inside a grid with an ajax request.

The grid method inside GridController? creates the grid and sets fetchUrl as url('/grid/grid_data', uri=uri) passing uri parameter as urlencoded.

When you go to the page (simply click 'GO TO THE GRID' in the index of the example) the grid_data method is called to perform update of the grid. The method has default parameters for everything and as you can see from the POST request every requested parameter is inside the request itself. But they are ignored, you can find the exception traceback in the logs.

Also it is possible to reproduce the problem by simply calling  http://localhost:8080/grid/grid_data?uri=test Even if there are the default parameters you will get a TypeError?: int() argument must be a string or a number, not 'NoneType?' as rq param is None

Attachments

postbug.tgz Download (95.6 KB) - added by amol 10 years ago.
Simple tg2 app to replicate the problem

Change History

Changed 10 years ago by amol

Simple tg2 app to replicate the problem

comment:1 Changed 10 years ago by mramm

  • Priority changed from normal to high

comment:2 Changed 10 years ago by percious

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.