[jifty-devel] canonicalize_ ajax call not doing the right thing
peter at sysnix.com
Wed Jan 9 06:27:47 EST 2008
Jesse Vincent wrote:
> Peter Mottram wrote:
>> I'm seeing some weirdness when using canonicalize_ inside my model as
>> there is a difference between how the ajax call handles things (badly)
>> and how the final POST request handles things (correctly).
>> Here's an extract of the relevant parts of my model:
>> So the ajax validator sees an empty value! If I enter somthing nice and
>> simple like '45th e4' then the result via ajax is correct as it returns
>> Could someone please point me in the right direction as to where to
>> start poking around in the Jifty code?
> I'd definitely start with the firebug XmlHttpRequest logging to see
> what's being posted to the server. Is the problem on the js side or the
> perl side?
Checking with firebug shows a perl problem since the failing canonicalize
does not get an 'update' returned to js in the xml.
> From there, it should be pretty easy to add a model to the
> jifty TestApp and a small test file which reproduces the problem using
> Test::WWW:Mechanize. Once you've done that, send a patch to jifty-devel,
> and make it all our problem ;)
I have attached a patch which includes a test case which passes and also
one that fails. I added the tests to 06-validation.t rather than creating
a new test file - hope that is OK.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2087 bytes
Url : http://lists.bestpractical.com/pipermail/jifty-devel/attachments/20080109/06b33a51/jifty-canonicalize-test.bin
More information about the jifty-devel