Hi all!

The link "Become joe friend" on a user profile isnt working. It doesnt loads the popup and nothing happen when you click on the link.

Im sure that its a simple thing but im not a coder and cant figure out how to fix this. :(

Thank in advance!

Comments

alex.k’s picture

Status: Active » Postponed (maintainer needs more info)

Please elaborate more on your setup: what relationship types you have, what other modules you're using, which permissions from user_relationships modules are granted. A screenshot would be nice as well. Have you tried different browsers as well?

feconroses’s picture

StatusFileSize
new39.86 KB

what relationship types you have: only 1 (friends).

what other modules you're using:

- User relationship: UR-API,UR-Blocks, UR-Mailer, UR-Node Access, UR-UI, UR-Views.
- Others related to UR: Views

which permissions from user_relationships modules are granted:

- Administer: administer user relationships
maintain own relationships
view user relationships
- Autenticated users: maintain own relationships
view user relationships
- Anonymous user: none

A screenshot would be nice as well: attached.

Have you tried different browsers as well: yes, chrome and firefox.

BTW: this is the url of my site: www.hiwz.org. If you need more info please tell me :)

Thanks!

alex.k’s picture

Hmm, I don't see "can have relationships" permission in your list. But the module should not show "Become x's friend" links in that case. Please check that it's enabled for the role anyway. Are there any errors in Firefox's console when you load the page or click the link?

feconroses’s picture

I forgot to say that, when i copy the url link in another window or tab, the page loads fine. Its the link that doesnt work.

Thanks again!

alex.k’s picture

Sounds like either the javascript file user_relationships_ui.js is missing, or there is a browser error. Run through update.php and clear cache in Admin->Site Configuration->performance just in case.

feconroses’s picture

The "can have relationships" is enabled for both Autenticated users and Admins.

Are there any errors in Firefox's console when you load the page or click the link: no, everything seems ok when i load the page. When i click the link nothing happens. Maybe its an ajax error?

Just checked and the user_relationships_ui.js file does exists (its in the folder /modules/user_relationships/user_relationships_ui).

Also, my version of UR is up to date (User Relationships 6.x-1.0-beta9).

:S

Thanks again alex!

alex.k’s picture

A wild guess, but can you disable captchas on your site and retry, especially as you have not yet configured recaptcha keys...

feconroses’s picture

I disabled all the captchas and it still doesnt work :(

feconroses’s picture

update:

Its a theme problem. I use Acquia Marina but i have tried with another random theme and the link actually works. Any idea how to fix this problem?

Thanks for the help!

alex.k’s picture

I'm not a themer, but I"d check what the differences are in the link and surrounding html between two themes... what other classes get applied with their own javascript behaviors. Failing that, you might want to raise it with acquia_marina folks.

Craftsman’s picture

StatusFileSize
new11.77 KB

I have the same problem. Ajax popup works fine only for administrator, regular registered user gets empty popup with ajax loading status bar though they have “can have relationships” is enabled.

alex.k’s picture

Title: Link "Become X Friend" not working » User Relationships AJAX Link "Become X Friend" not working
Project: User Relationships » Acquia Marina
Version: 6.x-1.0-beta9 » 6.x-1.x-dev
StatusFileSize
new166.77 KB

I'm going to move it to the Acquia Marina project. Perhaps theme's maintainers will know more. It does work in Garland - tried using the Russian language as well as a non-admin user, and it worked regardless.

Craftsman’s picture

Project: Acquia Marina » User Relationships

I switched to Garland and unfortunately I have the same problem.

alex.k’s picture

Could you check what errors you get with Firebug. When you click on the request link, check what is being loaded via ajax, whether it's an error message of any kind. Also, check that users have the "maintain own relationships" permission.

Craftsman’s picture

It works after I checked maintain own relationships!

Without that privilege in XHR log in firebug I receive line like that (when I click on “Became fiend ” link)

http://192.168.204.133/drupal/relationship/43/request/1?destination=user%2F43&ajax=1     403 Forbidden.

Is it necessary for regular users to have both permissions - ‘maintain own relationships’ and ‘can have relationships’?

alex.k’s picture

Assigned: Unassigned » alex.k
Status: Postponed (maintainer needs more info) » Fixed

Glad it works now :) Yes the permission is necessary. I think the intent was to support a situation where some users should not be able to create their own relationships, only accept ones given to them.

Marking as fixed; to original poster, if the above steps do not work for you, pls reopen. Thanks.

Status: Fixed » Closed (fixed)

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

vishalchavda’s picture

Status: Closed (fixed) » Active

This bug is still present, but its to do with the theme. I am using the waffels theme and I get the problem. Its not happening with garland

alex.k’s picture

Status: Active » Fixed

Please open a new issue with maintainers of the theme. Thank you.

SeanBannister’s picture

Status: Fixed » Active

I'm also experiencing this problem:
- I've set the permission "maintain own relationships" for the users.
- But I'm also using the Acquia Marina theme.

When I click on the "Become *'s Friend" an AJAX call is made and the browser receives the data correctly (according to firebug). But the popup window isn't displayed. So this is either a javascript conflict or possibly CSS.

Because this is showing up in at least 2 themes I'm marking this as active. I believe this is probably an issue in multiple themes and hoping a fix can be found in the module.

alex.k’s picture

Category: support » bug
Jon_Ashdown’s picture

Hi all, this is also a problem with multiplex theme.
Also on approve and disapprove links.
It looks like a GET request is being sent to the server, and a 200 OK response and the elaboration/confirmation form is being recieved by the browser but not handled. Could this be down to a missing ajax module ?

Jon_Ashdown’s picture

simple workaround : rename user_relationships_ui.js to user_relationships_ui.js.zzz this disables the ajax queries and causes the links to behave in a sensible way

alex.k’s picture

Title: User Relationships AJAX Link "Become X Friend" not working » User Relationships AJAX Link "Become X Friend" not working in certain themes
Michsk’s picture

i had the same problem. Fixed it with adding
print $closure;

in the bottom of page.tpl.php just above /body

SeanBannister’s picture

I also discovered a theme I was working on was missing $closure. It was developed by a none themer and took me a while to diagnose but it was causing all sorts of problems due to the fact that a lot of javascript is loaded in $closure.

alex.k’s picture

Status: Active » Fixed

Thanks for troubleshooting. If missing $closure isn't an issue with the other contrib themes reported above, please reopen and let me know which theme it is. I've also added an admin setting that allows turning AJAX popups off. It's at /admin/user/relationships/settings under 'AJAX Popup Positioning'. http://drupal.org/cvs?commit=262462

Status: Fixed » Closed (fixed)

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

oduvanchik’s picture

StatusFileSize
new139.24 KB

it doesn't work for me too...

use garland, chameleon themes, any browsers,
maintain own relationships is checked
when I press "Add X as a friend" it works fine, but when I try to approve or disapprove the request - garland shows just main home page in popup and chameleon shows the page with pending requests. so basically I can't approve any request..

oduvanchik’s picture

I fixed it by installing ajax module for forms. Now it works perfect

RealGecko’s picture

StatusFileSize
new165.55 KB

Using version 1.3 of UR with Drupal 6.26, issue is present. If I click "become friend" link nothing happens. If I open link in new tab or window I see confirmation dialog. Installation is clean, no extra modules enabled, installation of AJAX for forms does not help. Any ideas?
PS: more info in attachment.

RealGecko’s picture

Installed latest development version: 1.3 +2-dev, worsk fine:)