I am evaluation Pylons with the hope of porting a large webapp to it.
So far, I am loving it. Thanks for the great work.
Now, I am having a small problem with the Flickr tutorial. While it
works great in Firefox, I get a javascript error in IE after each ajax
request completes. The blind_down effect works the first time, but is
broken after that.
In the form_remote_tag, replacing:
complete = h.visual_effect("Blind_down", "photos"),
by:
complete = "alert('Done');",
made the error go away, so I first suspected a problem with blind_down
and my version of IE (6.0). But I went to check on the Scriptaculous
page, and the effect works fine there.
Any ideas?
Thanks!
--
Yves-Eric
Webhelpers' Scriptaculous is getting a little old (version 1.6.2),
whereas the latest version, 1.6.5, might have fixed this issue among
others.
Easiest way to find out would be to download the latest, and place it
(and the prototype.js it wants) in a 'javascripts' dir in your flickr
project's public directory. This will override the built in versions.
--
Philip Jenvey
> Now, I am having a small problem with the Flickr tutorial. While it
> works great in Firefox, I get a javascript error in IE after each ajax
> request completes. The blind_down effect works the first time, but is
> broken after that.
>
> In the form_remote_tag, replacing:
> complete = h.visual_effect("Blind_down", "photos"),
> by:
> complete = "alert('Done');",
> made the error go away, so I first suspected a problem with blind_down
> and my version of IE (6.0). But I went to check on the Scriptaculous
> page, and the effect works fine there.
I've updated the svn of WebHelpers to use the latest scriptaculous
Javascripts, can you try updating your WebHelpers package and see if
the issue is resolved?
Here's the command to update your WebHelpers package:
easy_install -U WebHelpers==dev
Cheers,
Ben
Ben Bangert wrote:
> I've updated the svn of WebHelpers to use the latest scriptaculous
> Javascripts, can you try updating your WebHelpers package and see if
> the issue is resolved?
> Here's the command to update your WebHelpers package:
> easy_install -U WebHelpers==dev
I just did that and got webhelpers==0.2.3dev-r1612, but there is some
weirdness going on and it breaks the tutorial: I know get a traceback
(exceptions.KeyError: "'tags'" ), with both FF and IE. Investigating it
a bit, I added:
print request.params
at the begining of the search action, and here is what I get:
MultiDict([])
I downgraded by doing: easy_install -U WebHelpers==0.2.2
and now I get correctly something that looks better:
MultiDict([('tags', 'flower'), ('commit', 'Find'), ('_', '')])
and things work again.
I there something broken in webhelpers==0.2.3dev-r1612, or did I do
something wrong? Do I need to do anything else to "update" my local
copy of the flicrk tutorial, or do I need to recreate it from scratch
after doing "easy_install -U WebHelpers==dev" ?
Thanks for the help!
--
Yves-Eric
Philip Jenvey wrote:
> Webhelpers' Scriptaculous is getting a little old (version 1.6.2),
> whereas the latest version, 1.6.5, might have fixed this issue among
> others.
>
> Easiest way to find out would be to download the latest, and place it
> (and the prototype.js it wants) in a 'javascripts' dir in your flickr
> project's public directory. This will override the built in versions.
Thanks for the suggestion, I just tried it, but got the same traceback
(see my other reply), due to now request.params being:
MultiDict([])
Wow, there is some deep juju going on here...
--
Yves-Eric
OK I think I found the problem: it's in the prototype.js version.
Executive summary:
Even though they are all advertised as '1.5.0_rc1':
prototype.js from webhelpers 0.2.2: BAD
prototype.js from webhelpers 0.2.3dev-r1612: VERY BAD
prototype.js from scriptaculous 1.6.4: GOOD apparently
Yves-Eric wrote:
> a bit, I added:
>
> print request.params
>
> at the begining of the search action, and here is what I get:
>
> MultiDict([])
Aha, looks like prototype.js is at fault here. I diffed the one that
came with WebHelpers 0.2.2, and the one from the latest scriptaculous
tarball (scriptaculous-js-1.6.5.tar.bz2). While they are both
advertised as '1.5.0_rc1', there are differences all over the place!
Definitely not the same beast...
I installed manually (by placing the js files in /public/javascripts as
Philip suggested) scriptaculous 1.6.5 and the prototype.js that came
with it: I got the same error as with webhelpers 0.2.3dev-r1612!
I then delete just "prototype.js" from my /public/javascripts to get
the one from webhelpers 0.2.2... (but the scriptaculous files are still
the 1.6.5 ones): works again, but the same error in IE as before.
So I went ahead and installed the Microsoft script debugger to get some
minimal javascript debugging in IE, and the error I was getting
initiall was indeed in prototype.js...
So I tried one version down, with scriptaculous 1.6.4 (that also has a
prototype.js advertised as '1.5.0_rc1', but is yet again a different
version, but this time with only tiny differences with the one from
webhelpers 0.2.2)... And now everything seems to work!
Conclusions: see the executive summary at top (^_^)
--
Yves-Eric
> OK I think I found the problem: it's in the prototype.js version.
>
> Executive summary:
>
> Even though they are all advertised as '1.5.0_rc1':
> prototype.js from webhelpers 0.2.2: BAD
> prototype.js from webhelpers 0.2.3dev-r1612: VERY BAD
> prototype.js from scriptaculous 1.6.4: GOOD apparently
Yea, Phil and myself were rather mystified at them changing the code
fairly substantially but not bumping version numbers as well. Can you
try the absolute latest Scriptaculous 1.7.0 beta and see if that
fixes the issue? Here's the d/l link:
http://script.aculo.us/beta/scriptaculous-js-1.7.0_beta2.zip
Cheers,
Ben
I just tried 1.7.0_beta2, and it fixes the issue too. I'll stick to
1.6.4 for now though: my customers get nervious every time they see
"beta"... :-)
Cheers!
--
Yves-Eric
Argh, sorry, IE's overzealous cache got me again. After more extensive
testing, 1.7.0_beta2 fails in the same ways as 1.6.5 / webhelpers
0.2.3dev-r1612, with that nasty empty request.params error.
So the current status of prototype.js is:
from webhelpers 0.2.2: BAD
from webhelpers 0.2.3dev-r1612: VERY BAD
from scriptaculous 1.6.4: GOOD
from scriptaculous 1.7.0_beta2: unfortunately still VERY BAD
Cheers,
--
Yves-Eric
paste.request.parse_formvars didn't accept parameters in
CONTENT_TYPE. prototype.js sets a charset parameter, which caused a
problem.
Have you tried upgrading to Paste 1.1? Does that fix the issue or is it
totally unrelated?
Cheers,
James
James Gardner wrote:
> I just noticed that there was a change in Paste 1.1 which might affect
> things:
>
> paste.request.parse_formvars didn't accept parameters in
> CONTENT_TYPE. prototype.js sets a charset parameter, which caused a
> problem.
>
> Have you tried upgrading to Paste 1.1? Does that fix the issue or is it
> totally unrelated?
Wow, nice catch! Following the "pase 1.1 troubles" thread, I had to
downgrade to Paste 1.0.1 to get public content served properly. Since
it looks like the Windows path problem has been solved, I upgraded to
Paste 1.1.1, and indeed, things work fine now!
I tried 1.6.5 and 1.7.0_beta2, the and the request.params problem is
gone with both.
Thanks a lot, and again, nice catch!
Cheers,
--
Yves-Eric