-
Notifications
You must be signed in to change notification settings - Fork 2.4k
TypeError: toPage.data("page") is undefined #2640
Comments
As soon as I get home! Our project is very close to launch and a bug of this
|
I can't seem to get your rar unpacked, but one thing you should keep in mind is that pages loaded via ajax will only load the first |
I had the same problem. It is not related to loading two different page data roles through AJAX. Here is a jsfiddle: http://jsfiddle.net/jGKWU/ Click on "Work" and then click on any of the "Client #" links. This action causes the error. Good luck! EDIT: Okay, it turns out that the problem was this: because pageSelector was the id of the page, so I changed it to this: and all is good. |
Still, with Jqm 1.1.0 the bug is there. To summarize (using backbone ): this.cleanupPossiblePageDuplicationInDOM(); $(this.el).html(htmlContent); $("body").append($(this.el)); // --> SOLUTION FOR ME $.mobile.changePage("#" + this.id, { ... $(document).bind("mobileinit", function(){ |
@toddparker @johnbender @uGoMobi in the fiddle they are trying to pass query params to internal pages (not supported) per http://jquerymobile.com/test/docs/pages/page-navmodel.html so i would close this its also been stale for a year from OP and 5 months from anyone else |
Closing the issue based on the note you added saying it is working as intended. Please comment if you still see something we can improve here. |
I've put together a simple testcase for you to see the issue for yourselves. http://data.fuskbugg.se/skalman02/36fa2d81_toPage_undefined.rar
Start at index.html and try getting to step 2 of the sign in process by just using the links at hand.
Using http://code.jquery.com/jquery-1.6.4.js and http://code.jquery.com/mobile/1.0rc1/jquery.mobile-1.0rc1.js
Issue:
Browse to signin.html from index.html, everything looks fine, when you try getting to page #step-2 of signin.html you'll be thrown back to index.html (at least the view, the url is still signin.html#step-2, like it should be.)
When using the Firebug console and running $.mobile.changePage($('#step-2')) I'll get "TypeError: toPage.data("page") is undefined" thrown in my face.
I find no information about this issue anywhere, and I have no idea why this happens.
Edit: It seems this is "working as intended" as this seems to be a really old issue.
#2637
#1995
Horrible.
The text was updated successfully, but these errors were encountered: