I upgraded to the latest module release and the back button stopped working. It returns to the splash page and then crashes the app (no matter where in the app you are when you click the back button). I tested this by making a completely new app with no code modifications or added modules and the back button showed the same behavior. I tried using the .dev of the latest release and also got the same issue.

Where can I grab a copy of 7.x-1.13 that I can use until this is resolved?

Edited to add: I have debug set to true but no info appears once the back button is clicked.

Comments

eudaemonia created an issue. See original summary.

eudaemonia’s picture

Issue summary: View changes
tyler.frankenstein’s picture

Version: 7.x-1.14 » 7.x-1.x-dev
Component: Module Code » Mobile Application Development Kit Code
Category: Bug report » Support request
Status: Active » Postponed (maintainer needs more info)

The DrupalGap module really has nothing to do with the back button, as the back button is entirely powered by the DrupalGap SDK. So I very much doubt upgrading the DrupalGap module broke your back button. I'd try rolling back a release of the bin/drupalgap.js file instead.

eudaemonia’s picture

Where would I find that? The 7.x-1.2 release doesn't have a drupalgap.js file

Only local images are allowed.

tyler.frankenstein’s picture

eudaemonia’s picture

I mentioned in my last comment that the the 7.x-1.2 release doesn't have a drupalgap.js file. When I go to https://github.com/signalpoint/DrupalGap/releases, the only release I can find that has a drupalgap.js file is 7.x-1.3. When I make a new app with that release, the back button crashes the app.

tyler.frankenstein’s picture

Each release has a bin/drupalgap.min.js file, you can include that in your index.html file. If it still isn't working, please indicate what platform and version number you are working with (i.e. android vs. iOS and what version #).

eudaemonia’s picture

I'm using iOS and SDK 7.x-1.2, drupalgap module 7.x-1.14. This is how I have my index.html set for the drupalgap.js:

bin/drupalgap-7.x-1.2.min.js

I'm still getting the broken back button with a new fresh build (no modules, no changes in the code).

tyler.frankenstein’s picture

What version of iOS though?

eudaemonia’s picture

ios 9

tyler.frankenstein’s picture

Status: Postponed (maintainer needs more info) » Postponed

It's a bug with iOS 9 and DG, I have no way to test/debug it.

tyler.frankenstein’s picture

Title: Back Button Broken » Back Button Broken in iOS9
Status: Postponed » Needs work

Other folks are experiencing this same problem, I tried adding this to _drupalgap_back():

  if (device.platform === "iOS" && parseInt(device.version) === 9) {
      //history.go(-1);
      //history.go(drupalgap.back_path.length * -1); // restarts the app
      //history.go(drupalgap.back_path.length);
      //window.navigator.app.backHistory();
      //history.back();
      history.go(1);
      //window.history.back();
    }
    else {
      history.back();
    }

I also added this to DG's device ready handler:

    if (device.platform === "iOS" && parseInt(device.version) === 9) {
      $.mobile.hashListeningEnabled = false;
      $.mobile.pushStateEnabled = false;
    }

Unfortunately these aren't working.

tyler.frankenstein’s picture

Status: Needs work » Fixed

Actually, I was able to fix this moments before I was about to give up. Grab the latest bin/drupalgap.js or bin/drupalgap.min.js for the fix: https://github.com/signalpoint/DrupalGap/issues/671

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.