Download & Extend

Create profile2 ctools relationship context from node

Project:Profile 2
Version:7.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

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.

Comments

#1

see the patch

AttachmentSizeStatusTest resultOperations
1834920-1-profile2-ctools_relationship_context.patch2.51 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1834920-1-profile2-ctools_relationship_context.patch. Unable to apply patch. See the log in the details link for more information.View details | Re-test

#2

Status:needs review» needs work

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

#3

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

#4

Status:needs work» needs review

#1: 1834920-1-profile2-ctools_relationship_context.patch queued for re-testing.

#5

Status:needs review» needs work

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

#6

Status:needs work» needs review

#7

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.

#8

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

nobody click here