Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1834920-1-profile2-ctools_relationship_context.patch | 2.51 KB | elliotttf |
Comments
Comment #1
elliotttf CreditAttribution: elliotttf commentedsee the patch
Comment #3
elliotttf CreditAttribution: elliotttf commentedNot sure why the test bot barfed on this one... the patch applies correctly for me.
Comment #4
elliotttf CreditAttribution: elliotttf commented#1: 1834920-1-profile2-ctools_relationship_context.patch queued for re-testing.
Comment #6
elliotttf CreditAttribution: elliotttf commentedComment #7
fagoLet'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.
Comment #8
fagooh, 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