heyrocker/services

uptodate commit bug

Closed this issue · 3 comments

Get this errors when accessing services/%/resources

On Front-end:

Fatal error: Unsupported operand types in /var/www/user.globalgameport.com/html/includes/common.inc  on line 2886

On Drupal Log:

 warning: Cannot use a scalar value as an array in /var/www/user.globalgameport.com/html/includes/form.inc on line 893.
 warning: Cannot use a scalar value as an array in /var/www/user.globalgameport.com/html/includes/form.inc on line 894.
 warning: Cannot use a scalar value as an array in /var/www/user.globalgameport.com/html/includes/form.inc on line 897.
 warning: Cannot use a scalar value as an array in /var/www/user.globalgameport.com/html/includes/form.inc on line 909.
 warning: Cannot use a scalar value as an array in /var/www/user.globalgameport.com/html/includes/form.inc on line 912.
 warning: Cannot use a scalar value as an array in /var/www/user.globalgameport.com/html/includes/form.inc on line 917.
 warning: Cannot use a scalar value as an array in /var/www/user.globalgameport.com/html/includes/form.inc on line 866.
 warning: Cannot use a scalar value as an array in /var/www/user.globalgameport.com/html/includes/form.inc on line 885.
 warning: Cannot use a scalar value as an array in /var/www/user.globalgameport.com/html/includes/form.inc on line 888.
 warning: uasort() [function.uasort]: The argument should be an array in /var/www/user.globalgameport.com/html/includes/common.inc on line 2884.

Are you using the session auth module? It is still really flaky and shouldn't be used yet. Unfortunately it does not currently cleanly disable either. I do have a small fix for this but I won't be able to check it in until later.

ah ok. i have disabled all auth modules yet. now it works half :D it seems that in the $controller variable in services_controller_execute in services.runtime.inc
the 'file' part is missing.

here my resource:

return array(
    'login' => array(
        
        'index' => array(
            'file' => array('type' => 'inc', 'module' => 'login_resource'),
            'Help' => 'returns User ID',
            'callback' => '_login_resource_info',
            'access arguments' => array('access content'),
            'access arguments append' => TRUE,
            'args' => array(
                array(
                    'name' => 'dummy',
                    'type' => 'int',
                    'description' => 'Without it doesnt work..',
                    'source' => 'params',
                    'optional' => TRUE,
                ),
            ),
        ),
    ),
  );

Try using the REST Server that is included in the current Services source. I fixed a few minor bugs in it, and this is the one we'll be using going forward since REST Server will be included in the new version.