Jump to content

Mobile view is no longer working ( iOS9, jQuery ) - category page stuck after 2 products


Scully

Recommended Posts

Since I've updated my iPhone to IOS9 is noticed that the mobile view has several issues.
Out ps installation is a 1.5.6.2. version.

1) Back button sometimes leads to blank page
2) Mobile category page is only loaded with 2 or 3 (out of 10) products

Anyone has noticed similar or same problems.
Our shop url is:
http://mit100wir.ch/wirshop/

Edited by Scully (see edit history)
Link to comment
Share on other sites

And by the way, these are possibly all jquery related js files. Does anyone know why there are so many?

Do all installations have so many js included?

 

BASEURL/js/jquery/jquery-1.7.2.min.js

BASEURL/js/jquery/jquery-migrate-1.2.1.js

BASEURL/themes/default/mobile/js/jquery.mobile-1.3.0.min.js

BASEURL/themes/default/mobile/js/jqm-docs.js

BASEURL/js/jquery/plugins/fancybox/jquery.fancybox.js

Link to comment
Share on other sites

Bump again.... We tested some 1.5.6. fresh installs. Same problem there. With IOS 9.0.2. pages stop loading completely. In most of the cases, only 2 items are displayed.

This occures in the category as well as manufacturers or prices-drop pages.

 

Any help is highly appreciated.

Link to comment
Share on other sites

We did that update even it's not the real issue. The problem occurs AFTER having detected an iOS device. So the device itself is recognized correctly as mobile device. But when the page loads, it stops after the first 2 products. If we then press the reload button, it works as expeced.

 

Printscreen here

 

Edited by Scully (see edit history)
Link to comment
Share on other sites

Having a read through other forums, its not just PS related. It seems to be related to the Jquery mobile.js

Some peeps updated it to 1.4.5, others have had to disable transitions etc.

 

I think PS will have to update the jquery mobile.js that they are using and maybe other bits of code.

Link to comment
Share on other sites

  • 2 weeks later...

It looks like I have found the culprit:

 

With iOS 9 the problems seem to be caused by the links inside the navigation (categories, prices-drop etc). These are ajax links. How to solve?

Disable ajax calls for iOS 9. This must be done after loading the jquery javascript and BEFORE loading jquery mobile. So we decided to add this code at the very beginning to the file jquery-migrate-1.2.1.js which is loaded excactely between:

 

/* 31.10.2015 Scully Fix iOS 9 navigation problems - disable Ajax calls */
var device = navigator.userAgent;
// alert('Your device is: ' + device);
if (isAffectedDevice()) {
$( document ).on( "mobileinit", function() {
        $.extend( $.mobile , {
        ajaxEnabled: false,
        pushStateEnabled: false
        });
});
}
function isAffectedDevice() {
    if((navigator.userAgent.match(/iPhone/i)) && (navigator.userAgent.match(/OS 9/i))) {
        // alert('iPhone OS 9');
        return true;
} }

 

Short Explanation:

Some users in other forums think it might be an issue since iOS 9 is more strict about ajax calls with non HTTPS connections. Other users see other reasons. However ....

isAffectedDevice checks on iPhones with iOS 9 Version. On mobileinit we disable ajax calls if this is the case. It works so far but needs further testing.

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...