I'm trying to setup DrupalGap with Commerce following this tutorial, but I get this error:

404 not found: could not find the controller.

I've manually confirmed Services are set up properly with Advanced REST client (Chrome), with this instructions. All seems OK; the endpoint/resource is operating and I receive a 200 OK response, but when I try to test the application from admin/config/services/drupalgap, I always get this error.

I use Services frequently and I can confirm It's working good on this site. I also verified DrupalGap is working too.

What could it be?

  • Using the Network tab in your browser's development tools, what is the URL that is throwing the 404 error? May 6 '17 at 22:54
  • This is the secuence: 301 GET drupalgap?q=services/session/token; 200 GET token; 301 POST /?q=drupalgap/system/connect.json; 404 GET connect.json. The last URL requested, when I get 404 error is: .../drupalgap/system/connect.json
    – briast
    May 7 '17 at 13:21
  • A 301 is a redirect, it sounds like you have the Global Redirect module enabled. See this note for details: drupal.org/node/1927336 May 8 '17 at 1:10
  • Thanks. It worked great. I have applied the latest patch and I have followed your instructions: drupal.org/node/1438584#comment-11738043
    – briast
    May 8 '17 at 7:14
  • Wonderful, I've added an answer with some more details. May 8 '17 at 13:34

A 301 is a redirect, so it sounds like you have the Global Redirect module enabled. See this issue for details: https://www.drupal.org/node/1927336

The patch allows you to declare paths that should be ignored by the Global Redirect module so it doesn't hijack Service calls to your Drupal site. You'll input something like this into the configuration text area once the patch has been applied:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.