In _services_process_resource(), is the following loop

  // Actions and relationships.
  foreach (array('relationships', 'actions', 'targeted_actions') as $class) {
    if (!isset($resource[$class])) {
      continue;
    }

    foreach (array_keys($resource[$class]) as $action_name) {
      $class_singular = trim($class, 's');
      $controllers[$name . '/' . $class_singular . '/' . $action_name] = &$resource['relationships'][$action_name];
    }
  }

This causes all sorts of chaos because it hard codes a check for relationships, even when processing actions and targeted actions. Attached patch fixes this.

CommentFileSizeAuthor
#1 1274132_relationships_bug.patch772 bytesgdd

Comments

gdd’s picture

StatusFileSize
new772 bytes

Correction: attached patch fixes this.

gdd’s picture

It appears that this also resolves the problem in #1268802: Some resource methods listed twice

kylebrowning’s picture

Status: Needs review » Reviewed & tested by the community

THis looks good and verified it fixes the issue.

kylebrowning’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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