I've created a directional, unique relation between organizations named "is creator of", with reverese label "is created by", just as it si described here: https://drupal.org/node/1276284
My relation structure is: Org A -> Org B and Org B -> Org C. But on Org B's connections page it says "is creator of" for both connections. One should be "was created by". It's very interesting, because a similar issue was marked fixed a year ago: #1674984: Reverse label of relation not showing
In redhen_relation.module, at line 195, the relation_get_type_label() function is called without a second argument, what is for reverse label. Here's a patch to fix this, please review it.
Comment | File | Size | Author |
---|---|---|---|
#7 | redhen_2036515_reverse_label.patch | 694 bytes | Liam Morland |
#4 | redhen_relations-reveresed-label-not-shown-3.png | 71.98 KB | fricike |
#3 | redhen_relations-reveresed-label-not-shown-2.png | 58.37 KB | fricike |
#1 | redhen_relation-reversed-label-not-shown-2036515-1.patch | 1 KB | fricike |
Comments
Comment #1
fricike CreditAttribution: fricike commentedThe patch.
Comment #2
levelos CreditAttribution: levelos commentedThanks fricike, committed with a slight change in 1025ec3d86caa3f0c530971f64f50c19b109ad6e.
Comment #3
fricike CreditAttribution: fricike commentedI hate to say this, but it's not working. :( Here's a screenshot. The relation label is "raised up", the reverse is "was raised up".
Comment #4
fricike CreditAttribution: fricike commentedSorry, the texts on the picture are messed up, here's a corrected one.
Comment #5
Liam MorlandComment #6
Liam MorlandThe method in the patch for determining whether or not the label is reversed doesn't work if both items are of the same type, such as a parent/child relationship between two entities of type person.
Comment #7
Liam MorlandThis patch is fixing it for me. Caution: I don't understand the code in detail, so it might work just for my specific parent/child case and not in other cases.
Comment #10
gcbComment #11
Liam MorlandThanks very much.
Issues should be marked Fixed; they will change to "Closed (fixed)" automatically if there are no follow-up comments.