Closed (fixed)
Project:
Flag Friend
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Dec 2008 at 21:16 UTC
Updated:
26 Dec 2011 at 03:51 UTC
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
Comment #1
DerTobi75 commentedSame here, can confirm this bug!
Comment #2
likewhoa commentedsame here on drupal 6.8 and flag friend 6.x-1.x-dev
Comment #3
casperloc76 commentedI too can confirm this bug. I'm running drupal 6.8, views 2.2 and flag friend 6.x-1.x-dev.
Comment #4
jaydub commentedWhen 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?
Comment #5
sirkitree commentedThese 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.
Comment #6
casperloc76 commentedMy 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.
Comment #7
sirkitree commentedI'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.
Comment #8
sirkitree commentedComment #9
casperloc76 commentedI 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.Comment #10
sirkitree commentedI'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
Comment #11
sirkitree commentedso 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
Comment #12
sirkitree commentedand 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 :)
Comment #14
Berliner-dupe commentedHi,
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
Comment #15
Berliner-dupe commentedComment #16
sirkitree commentedIt 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?
Comment #17
Berliner-dupe commentedHi 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
Comment #18
Berliner-dupe commentedHello 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.
Comment #19
sirkitree commented@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.
Comment #20
Berliner-dupe commentedHi 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
Comment #22
Mr.vantri commentedhere problem is: remove friend still run normal. But when i chose case 'JavaScript toggle' in views ,it don't remove.