When I click on "remove friend" in the "friends" tab on user profile, it loads the spinning ajax thing for a second, then reverts back to "remove friend" text. The friend is not removed.

Andrey.

Comments

DerTobi75’s picture

Same here, can confirm this bug!

likewhoa’s picture

same here on drupal 6.8 and flag friend 6.x-1.x-dev

casperloc76’s picture

I too can confirm this bug. I'm running drupal 6.8, views 2.2 and flag friend 6.x-1.x-dev.

jaydub’s picture

When I go to the Friends tab and have a link to remove the friend it is not an Ajax link but a regular link that goes to a confirmation page...is there something I am missing that would turn this link into an Ajax link?

sirkitree’s picture

These should all be confirmation links by default. Not ajax. You can see that it is defined within function flag_friend_flag_default_flags() by link_type which is locked and should not be changed to ajax.

casperloc76’s picture

My remove friend link does display a confirmation page on click. However, when I confirm the removal of friend and return to the display view the friend name is still their with the "remove friend" link. Again I am using drupal 6.8, views 2.2 and flag friend 6.x-1.x-dev. Any help would be appreciated as this is the only known bug on my site.

sirkitree’s picture

I've committed some changes to the module. One of the changes involves better checking for the removal of friends.

Please read the commit message here before updating: http://drupal.org/cvs?commit=164655

Please report back if you're still experiencing this bug and I'll give it more attention.

sirkitree’s picture

Status: Active » Postponed (maintainer needs more info)
casperloc76’s picture

I updated the module to the latest dev but I'm still experiencing the bug. I also uninstalled/re-installed the module and cleared the cache with no effect. I am also using flag module 6.x-1.x-dev (2008-Dec-16). all the views options are set to default as well.

UPDATE:
I have a custom user-profile.tpl.php and manually inserted the flag link using print $profile['flags'] . The remove friend function works correctly on this page when I click the "remove friend" link and also shows no friends within the friends tab. However I still can't remove a friend from the view.

sirkitree’s picture

I've just updated the default views with a few changes. Please give them a try and see if it resolves your problem.

http://drupal.org/cvs?commit=168745

sirkitree’s picture

so that commit kinda screwed up the views and their original intended purpose. I've fixed 'em up. there is a remove link when you go to user/N/friends that should work correctly for you. I believe this was your original issue.

http://drupal.org/cvs?commit=168760

sirkitree’s picture

Status: Postponed (maintainer needs more info) » Fixed

and again i speak too soon... /sigh. One of these days I'll learn to check my own work first.

Anyway, I found the problem. ON the link provided by the view, the links is:
/flag/confirm/unflag/friend/N
Whereas it SHOULD be:
/flag/confirm/unfriend/friend/N

Why is this happening? Because the function flag_friend_create_link() is spitting out the incorrect link. The following commit should fix it all up.
http://drupal.org/cvs?commit=168767

Looks good on my local now, please test it out when you getta chance. if it still doesn't work for you, report back. Otherwise marking this green :)

Status: Fixed » Closed (fixed)

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

Berliner-dupe’s picture

Version: 6.x-1.0 » 6.x-1.0-rc4
Component: Code » Documentation
Status: Active » Closed (fixed)

Hi,

same problem here.

When i click "Remove friend" the friend dont remove (not happen).

When i reload the page ....

user warning: Duplicate entry '1-1' for key 'PRIMARY' query: INSERT INTO flag_friend VALUES(1, 1, 1281446958) in E:\xampp\htdocs\projekt\sites\all\modules\flag_friend\flag_friend.module on line 30.

Its not possible that i can remove friends at the moment.

I tested it on XAMPP (PHP 5.2.9 + MySQL 5.1.33) and on my Online-Webserver (PHP 5.2.8 + MySQL 5.0.67) -> same problem.

I use the newest version 6.x-1.0 from 2010-Aug-08.

Anyone an idea?

Regards Matthias

Berliner-dupe’s picture

Version: 6.x-1.x-dev » 6.x-1.0-rc4
Component: Code » Documentation
Status: Closed (fixed) » Active
sirkitree’s picture

Version: 6.x-1.0-rc4 » 6.x-1.0
Component: Documentation » Code

It sounds like the link you are clicking is flagging, not unflagging. What does the link say? What is it's URL? How is this link being created?

Berliner-dupe’s picture

Version: 6.x-1.0-rc4 » 6.x-1.0
Component: Documentation » Code
Status: Closed (fixed) » Active

Hi sirkitree,

thank you for your fast answer.

When i click "Add friend" the link is

flag/flag/friend/******************

Then i click "Friend Requested. Cancel?" - it works correct - the link is ...

flag/unflag/friend/****************** after clicking he changed back to "Add friend"

But when the User "Approve" the friend request - the Menu-link changed to "Remove friend" .... the link is now

flag/unfriend/friend/******************

But after clicking this link - nothing happen .... "Remove flag" still show but the link-url changed back to

flag/flag/friend/******************

The friend-entry dont hide - there still show "Remove friend" ..... and the user is still in the friendlist (user/1/friends).

When i click over friendslist "Remove friend" - same problem - the users dont deleted ....

I cleared the cache and run cron but nothing ....

I have no idea where can i fix the problem?

What think you?

(Sorry for my bad english)

Regards Matthias

Berliner-dupe’s picture

Hello sirkitree,

i tested it now on a other drupal-installation on my Xampp - its the same version but without many modules.

There run "Flag Friend" without problems.

When i click "Remove User" then the next step is comming "Are you sure you want to remove user from your list of friends?" - this message i dont saw in my first installation.

The other installation use over 50 modules - i think one module from this conflict with flag friend - but which i dont know?

Shit - its sick - i need all modules for my project but flag friend i need too.

I am helpless.

sirkitree’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Status: Active » Fixed

@Berliner - Thank you for the update. Please make sure your module is completely up to date with the 1.0 version. If it is and you're still having problems, I would suggest a complete uninstall and reinstall and then disabling other modules one by one until you find the culprit.

moving this back to the original version of the ticket.

Berliner-dupe’s picture

Hi sirkitree,

Its works fine now. I deactivated the module (FriendList) uninstall flag friend und install new.

Now its works without problems.

Yeahh ... ;-) - i lost 5 hours ... puhh ... but i am very happy.

I can complete my project now.

Thank you for reply and for the great module "flag friend"!

Have a nice day

Best Regards from Berlin

Matthias

Status: Fixed » Closed (fixed)

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

Mr.vantri’s picture

here problem is: remove friend still run normal. But when i chose case 'JavaScript toggle' in views ,it don't remove.