Hello,

I'm using User Relationships module with 2 relations and multiple relationships are not allowed.

Actually, the 2 relationships link appears in the author pane but when we add a relation, the second relation still appears in it. This isn't logical :)

It's not really a bug, more something forget. Michelle has so much work with her modules, she can think to everything.

Thanks :)

CommentFileSizeAuthor
#2 576750.patch1.14 KBalex.k

Comments

michelle’s picture

Project: Author Pane » User Relationships
Version: 6.x-1.1 » 6.x-1.x-dev
Category: bug » support

I've never used more than one relationship, didn't write the integration code, and have no idea how this would work. Sending this over to Alex for help. :)

Here's a link to the current code: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/author_pane...

Any idea what should be changed, Alex?

Thanks,

Michelle

alex.k’s picture

Project: User Relationships » Author Pane
Version: 6.x-1.x-dev » 6.x-2.x-dev
Category: support » bug
Status: Active » Needs review
StatusFileSize
new1.14 KB

Seems the variable name that checks for multiple relationships was incorrect. It may have changed in UR at some point. Please see attached one-liner patch that fixed it for me.

Also, FWIW... updating from my older (1.x?) installation of AP, the block had a cache value of 1, so it was stuck until the cache value was changed in the DB. If you hear of similar issues that might be the reason, would need an update hook to clean it up for existing users.

michelle’s picture

Awesome, thanks!

@Junro: Could you try this and see if it fixes it for you? Go ahead and mark it RTBC if it does.

I'll be working on AP over the next few days so will get this in soon.

Michelle

michelle’s picture

Status: Needs review » Fixed

I'm working on AP tonight so just went ahead and committed it. If it didn't fix the OP, please let me know.

Thanks, Alex!

Michelle

Junro’s picture

Hello,

I'm sorry, I can't try the patch right now. I'm travelling in South America and can't find time to try it.
As soon as I have a day off, I will try it :)

Thanks for the patch :)

michelle’s picture

Ok, just let us know when you have time, please. And note that you don't need to apply the patch; I already committed it to the dev.

Thanks,

Michelle

Junro’s picture

Status: Fixed » Active

Hello, I'm just trying the dev 1.x dev version and nothing has change.

The second relation still appears in the author pane. Sure we can't have this relationship (popup apperas: You may not create any more relationships to this user.) but the link is still here.

@ Michelle

Did you committed the patch to the 1.x dev or 2.x dev or both? Because I'm still using 1.x version with AF 1.

Do I have to update another module? (I don't think so but...) Because I've got a few modules not yet updated.

Maybe I forgot something obvious too...?

Thanks :)

michelle’s picture

I committed it to 2.x but the patch should apply to 1.x as well since that code hasn't changed.

Michelle

Junro’s picture

Status: Active » Fixed

Hello,

I just updated the 2.x-dev version and the Relationship link is not be display if the relation is not allowed.

So, It works great and all is good now^^

Thanks! :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.