This project is archived and is in readonly mode.

#792 ✓invalid

Request if failing in Firefox (with both Get and Post attributes)

Reported by evergreen16 | November 20th, 2009 @ 12:39 AM | in 1.3.0 rc2 (closed)

I found a tricky bug in Mootools Request that is only happening in Firefox.

Basically if a Request is made with URL that has query string (like and also submits data (like .send('y=7')) - this will work fine in IE, but will fail completely in firefox. I tried latest version of FF and latest version of Mootools and still happening.

This is the request that will fail:
new Request.HTML({url:'', update:'contentDiv', evalScripts:true}).send('_eventId=gotoPage2');

With a little workaround like this, it will work.
new Request.HTML({url:'', update:'contentDiv', evalScripts:true}).get();

Due to involvement of spring webflow, which always adds the execution to the url, this problems started appearing. Obviously it can occur for other people for different reasons.

I tried debugging mootools and noticed, that when I added alert('...') into the onStateChange: method (ie. forced it to wait a little), it always worked. I'm sure you guys know much more about it and will be able to find the reason.

Comments and changes to this ticket

  • Christoph Pojer

    Christoph Pojer December 18th, 2009 @ 12:23 AM

    • State changed from “new” to “open”
  • Fábio M. Costa

    Fábio M. Costa April 12th, 2010 @ 04:08 AM

    • Assigned user set to “Fábio M. Costa”
    • Milestone changed from 2.0 to 1.3.0 rc2
  • Fábio M. Costa

    Fábio M. Costa May 9th, 2010 @ 12:01 AM

    • State changed from “open” to “invalid”

    ok got it. Maybe it's because when you use Request.HTML like this:

    new Request.HTML({url:'', update:'contentDiv', evalScripts:true}).send('_eventId=gotoPage2');

    you are sending execution as as GET variable and _eventId as POST.

    When you use like this:

    new Request.HTML({url:'', update:'contentDiv', evalScripts:true}).get();

    You are sending both by GET.

    This is all correct so, you should use method: 'get' as an option to solve your problem.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins