Currently you cannot create a profile2 ctools relationship from a node. Chaining to a user does not work since the ctools entity code expects the primary field of the entity you are joining to line up with the field you're trying to join against (i.e. $node->uid and $profile->pid).

Patch to follow.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

elliotttf’s picture

Status: Needs review » Needs work

The last submitted patch, 1834920-1-profile2-ctools_relationship_context.patch, failed testing.

elliotttf’s picture

Not sure why the test bot barfed on this one... the patch applies correctly for me.

elliotttf’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 1834920-1-profile2-ctools_relationship_context.patch, failed testing.

elliotttf’s picture

Status: Needs work » Needs review
fago’s picture

Status: Needs review » Needs work

Let's implement this in a general fashion in the entity api module: #1874006: Expose entity references as CTools relationships

Leaving this issue open as a reference and issue for discussions specific to profile2.

fago’s picture

Status: Needs work » Closed (duplicate)

oh, this is about relationships from nodes. For that we should go via the user, and implement a user relationship only. See #1011370: Ctools relationship from user