Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

loadPage/changePage broken in trunk (latest build) #1767

Closed
ernieracer opened this issue Jun 2, 2011 · 2 comments
Closed

loadPage/changePage broken in trunk (latest build) #1767

ernieracer opened this issue Jun 2, 2011 · 2 comments
Assignees

Comments

@ernieracer
Copy link

the following applies to the latest build: Git Info SHA1: 991db0d Date: Fri May 27 10:55:20 2011 -0700

changePage() is broken after the refactoring [ http://jquerymobile.com/blog/2011/05/27/jquery-mobile-team-update-week-of-may-23/ ] , it applies the Url parameter twice.

simplified repro:
[Note: I wasn't able to create a repro in jsFiddle, as I didn't know how to handle, display, and let fail of the ajax call.]

$(function () {
    $(':submit').click(function (event) {
        event.preventDefault();
        $.mobile.loadPage('/Street/Search', { data: { Criteria: 'test'} });
    });
});

the resulting ajax call looks like:

/Street/Search/Street/Search?Criteria=test [notice that '/Street/Search/' is doubled in the Url]

the causing code path is in function $.mobile.loadPage = function( url, options )

absUrl += absUrl + "?" + settings.data;

a short fix for this issue would be:

absUrl += "?" + settings.data;

but I don't know what implications this code change would trigger.

I'm fully aware that this happens in trunk, as I'm not sure about the reporting and handling of bugs in unreleased versions. I didn't see (or didn't find) any checkins after May 27 for this. The latest accessible nightly build is: http://code.jquery.com/mobile/nightlies/20110512/jquery.mobile-nightly.js

Thank you,
Daniel

@ghost ghost assigned jblas Jun 2, 2011
@jblas
Copy link
Contributor

jblas commented Jun 2, 2011

Hey Daniel,

Thanks for catching that, "my bad" ... I'll fix it shortly.

  • Kin

@jblas
Copy link
Contributor

jblas commented Jun 2, 2011

Fix landed on the HEAD.

b31825a

@jblas jblas closed this as completed Jun 2, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants