When you send a relationship request and the User Relationship PrivateMsg module is enabled, the private message which is sent to the requestee has the title "[[requester]] believes they are a of yours". The title should be "[[requester]] believes they are a [[relationship type]] of yours"
I've tracked this down to the function user_relationships_request_relationship in user_relationships_api.inc where the $relationship object is built before being handed over to the other modules for additional processing. The object build is currently
$relationship = (object)array(
'requester_id' => $requester->uid,
'requestee_id' => $requestee->uid,
'approved' => ($approved ? 1 : 0),
'rtid' => $type->rtid,
);
but I think it should be
$relationship = (object)array(
'requester_id' => $requester->uid,
'requestee_id' => $requestee->uid,
'approved' => ($approved ? 1 : 0),
'rtid' => $type->rtid,
'name' => $type->name,
'plural_name' => $type->plural_name,
);
I've patched my installation with this, and it seems to test out OK. However, could someone who understands User Relationships a bit better please review this before submission.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | userrelationships-271247-1.patch | 579 bytes | Mark B |
Comments
Comment #1
Mark B commentedAdding patch file - it's my first Drupal patch, so please be patient if I've done this all wrong!
Comment #2
reed.richards commentedI can confirm that this works! Good work!
Comment #3
jaydub commentedComment #4
alex.k commentedJust tried this use case, and it worked correctly without the patch. Something could be different about our setups. Could you try the current 5.x-2.x-dev release and re-test? Thanks.
Comment #5
berdirSorry for pinging the participants.
Now that Drupal 7 is out, there is no support for Drupal 5 and the corresponding modules anymore. Therefore, I'm closing all old issues which are still open.
I suggest you upgrade to Drupal 6 or 7 and figure out if you're feature is still needed or the bug still exists and open a new issue in that case.