In my user_relationships table I have an approved relationship with rid 36. When I run $relationship = user_relationships_load(36); it should return something right? I was getting nothing back. Upon further investigation I noticed user_relationships_load accepts a $param array and says that 'rid' is a valid key to specify when using this param array. However, there is a check in user_relationships_load that if the only argument is numeric, then it feeds that numeric into _user_relationships_generate_query as the 'rid' param. I first noticed this happening when I updated the module to alpha3 and tried to remove a relationship. I navigated to user/%user/relationships/%user_relationships/remove and the page was not found. It seems that the wildcard loader isn't working for user_relationships when only rid is provided.

A good start would be to put an 'rid' case in the switch statement that starts at line 123 of user_relationships.module.

Comments

Berdir’s picture

Version: 7.x-1.0-alpha3 » 7.x-1.x-dev
Status: Active » Closed (duplicate)

I think this is a duplicate of #1325908: Remove operation on relationships generates 404 page error, which I've just commited.