Hello,
I'm on D7, I'm trying the drupalgap for get json response for my android phonegap but something goes wrong: when I go at admin/config/drupalgap on System Connect Status I have an error message: Not found: Could not find the controller.

I follow the step by step installation instructions, Views JSON is active, spyc.php was download and place in /rest_server/lib/ directory..., rest server module is running, and gapmodul active too.

I don't find anything about this "System Connect Status" in doc files... so if some one have an idea about this, you are welcome :)

Thanks in advance,

Comments

Breakerandi’s picture

Same here, can it be a problem caused by Services 3.2, as described here: http://drupal.org/node/650776#comment-4895626 ?

tyler.frankenstein’s picture

Assigned: Unassigned » tyler.frankenstein
Status: Active » Fixed

Sorry for the delay. It appears the latest Services module changed up some stuff. When enabling the 'recommended version' of DrupalGap now, its Endpoint won't get set up properly. If you disable and uninstall the current DrupalGap module, then download the latest dev release for 7.x, then enable it, this problem should be taken care of.

Also be sure to visit the documentation and check out the troubleshooting section and the firefox poster tests to verify your Drupal site is set up properly: http://drupal.org/node/1603690

Breakerandi’s picture

The poster Plugin says that its not found. But i'm very sure i've checked everything as described here: http://drupal.org/node/1603690

tyler.frankenstein’s picture

Status: Fixed » Needs work

Please paste the URL you are trying to use with the Poster plugin here and I'll take a look.

Breakerandi’s picture

tyler.frankenstein’s picture

Status: Needs work » Fixed

Using Firefox Poster and doing a POST with Content Type application/x-www-form-urlencoded to this url works:

http://www.famjam.org/drupalgap/system/connect.json

It looks like DrupalGap is setup correctly on your site.

P.S. I just released 7.x-1.2 which should fix any problems with the newest version of the Services module.

Status: Fixed » Closed (fixed)

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

dmducc’s picture

Version: 7.x-1.1 » 6.x-1.x-dev
Status: Closed (fixed) » Active

Don't know where this is gonna post now...so:

RE: http://drupal.org/node/1820552

I am having a similar endpoint definition problem for the DrupalGap 6.x-1.1 release as well.
In conjunction with Services 6.x-3.3.

Does the fix suggested in the above post (that is: If you disable and uninstall the current DrupalGap module, then download the latest dev release for 7.x, then enable it, this problem should be taken care of.) work for a 6.x-1.x-dev upgrade as well.

dmduke

s.daniel’s picture

If the cause of your problem is the same change in services which may or may not be and it would require similar changes in D6 as in D7 it is unlikely those have been committed since as you can see at the modules page the last release of 6.x-dev if of 2012-May-17.

Tauph’s picture

Version: 6.x-1.x-dev » 7.x-1.2
Component: User interface » Code

Hi,

I'm back (late ! sorry), I tried all your advices.
At this time I upgraded drupalgap and services module, I added the spyc.php file and flush the cache (twice)
(Before downloading the newest module, I deleted all my services configuration to be sure...)

Now I have in admin/structure/services
drupalgap enabled
and in admin/config/drupalgap it still
Not found: Could not find the controller.

so, I tried with poster (url is this one, http://jungchristophe.fr/?q=drupalgap/system/connect.json)
and I have the same error.

I check all my configuration with this good page : http://drupal.org/node/1603690
but nothing help, all my configuration is ok ! :-/

I'm lost ! You can check my module list here: http://paste.ubuntu.com/1532825/

edit:

I check my fr/admin/reports/status page where I get this alert

Missing spyc library To enable YAML HTTP requets/responses, please download spyc and create a file called spyc.php in rest_server/lib or use Libraries to retrieve spyc.
The spyc library is missing, thus YAML is disabled

But I have downloaded the file
...sites/all/modules/services/servers/rest_server/lib# ls -l
total 44
-rw-r--r-- 1 root root 764 15 janv. 00:08 bencode.php
-rw-r--r-- 1 root root 6317 15 janv. 00:08 mimeparse.php
-rw-r--r-- 1 root root 31645 15 janv. 00:25 spyc.php

So, this is my problem? or not?

s.daniel’s picture

Is there an error message regarding spyc on your status page?

Note: the documentation regarding spyc is currently outdated. See http://drupal.org/node/1349588 for more details.

Can you access: admin/structure/services/list/drupalgap/resources ?

Tauph’s picture

As I said, on my statuts page: I have an info message (a blue one). I'm reading your post...
Drupalgap need Yaml support? But in fact I have the file in the folder sites/all/modules/services/servers/rest_server/lib.... so...I'm still reading your post...

Yes, i have acces to admin/structure/services/list/drupalgap/resources where all my drupalgap_* are check...

tyler.frankenstein’s picture

Status: Active » Needs review

If you manually disable, then re-enable the service resources at admin/structure/services/list/drupalgap/resources , does that fix the problem?

According to the module list in #10, here are my guesses at some modules that may be interfering with the Service Resource:

OAuth (I see you have this disabled, perhaps it needs to be uninstalled)
Redirect
Global Redirect
Boost
Memcahe

My advice would be to start a completely new D7 install in a localhost environment, get DrupalGap up and running first, then start enabling each of your modules one by one. That should reveal which one(s) is the problem.

tyler.frankenstein’s picture

I'd like to point out that using FireFox Poster to hit your System Connect URL with a clean URL results in this response:

FireFox Poster / POST / http://jungchristophe.fr/drupalgap/system/connect.json

<!-- Page cached by Boost @ 2013-01-15 03:22:16, expires @ 2013-01-15 04:22:16, lifetime 1 heure -->

s.daniel’s picture

@Tauph: Ah I think you updated your post after I started answering ;)

As Tyler pointed out the cause might be another module.

Have you tried and tested to create a normal services recource manually?

Here is some information regarding spyc and services.

(Note: Your issue seems not related to spyc)
It's been a while since I looked at it but this is as far as I remember the situation:
Aparently it is not actually required for REST services unless you want to use YAML. However you cannot activate the REST server in the current version when the spyc file is missing. Now in 7.x-3.3 the loading of the file changed and now uses libraries 2.x only so the old path (sites/all/modules/services/servers/rest_server/lib) wont work any more preventing rest_server module to be installed. If rest_server module had been installed before and libraries 2.x is present the module continues to run with the message on the status page about missing spyc. If libraries 2.x is not present the site will crash as with a undefined function call to libraries_load(). It's all a bit of a mess and the services documentation isn't helping either.

My patch (which I still need to finish but I'm writing my thesis currently) tries continues with the road the services maintainers took and only reads from libraries (sites/all/libraries/... not the old path) but updates the documentation to state this and makes spyc no requirement so rest server can be installed without it.

Tauph’s picture

I was quite busy this week, I'll be back next week with a clean install of D7 and I'll try to find which module is in conflict !
thanks

cimo75’s picture

Component: Code » Module Code

Hi
Global Redirect is the culprit here, any workaround?
Simone

tyler.frankenstein’s picture

Title: System connect statuts not found in confguration page » System Connect Status - Not Found

Does Global Redirect allow you to add exceptions? If so, adding http://www.example.com/drupalgap/* would be a good start.

cimo75’s picture

Unfortunately not, but that is what i asked in the GR issue queue

tyler.frankenstein’s picture

Category: bug » support
Status: Needs review » Closed (fixed)

Here's an updated list of contrib modules known to cause problems with DrupalGap Services:

  • Boost
  • Global Redirect

I've changed this issue to a support request and have closed it for now.

cialog’s picture

After some hours of testing different setups, I can confirm, that BOOST and GLOBAL REDIRECT need to be - not only disabled but actually - uninstalled to allow drupalgap to connect.

yoannl’s picture

I found a solution to remove the problem with global redirect enabled. It's not the final solution because I modified Global Redirect instead drupalgap ...

In the globalredirect.module file, in the globalredirect_init function, line 205, modifiy the next lines to get :

// If no alias was returned, the final check is to direct non-clean to
// clean - if clean is enabled
if ($settings['nonclean_to_clean'] && ((bool)variable_get('clean_url', 0)) && strpos(request_uri(), '?q=')) {
$res = explode("/",$current_path);
if (!($res[0] == "drupalgap")) {
globalredirect_goto($current_path, $options);
}
}

it works for me.

tyler.frankenstein’s picture

Disabling the 'Non-clean to Clean' to checkbox at admin/config/system/globalredirect allows DrupalGap to work with Global Redirect.

anybody’s picture

Issue summary: View changes

Any ideas how we can solve this cleanly?

I mean the functionality of global redirect is not bad and makes sense so what can we do?

tyler.frankenstein’s picture

See this issue for the Global Redirect fix: #1927336: Global Redirect Breaks Drupalgap