failure to shake
| Project: | User Handshakes |
| Version: | 5.x-0.9 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
i tried to make a handshake, but when i submit the handshake
i get this error
warning: Invalid argument supplied for foreach() in /home/iblogger/public_html/sites/all/modules/nf_handshake/nf_handshake.module on line 1749.
on the other side when i accept the handshake i get this error
* warning: key_exists() [function.key-exists]: The second argument should be either an array or an object in /home/iblogger/public_html/sites/all/modules/nf_handshake/nf_handshake.module on line 2432.
* warning: key_exists() [function.key-exists]: The second argument should be either an array or an object in /home/iblogger/public_html/sites/all/modules/nf_handshake/nf_handshake.module on line 2432.
* warning: key_exists() [function.key-exists]: The second argument should be either an array or an object in /home/iblogger/public_html/sites/all/modules/nf_handshake/nf_handshake.module on line 2432.
* warning: Invalid argument supplied for foreach() in /home/iblogger/public_html/sites/all/modules/nf_handshake/nf_handshake.module on line 2440.
* warning: array_count_values() [function.array-count-values]: The argument should be an array in /home/iblogger/public_html/sites/all/modules/nf_handshake/nf_handshake.module on line 2606.
* You accepted the request but failed to select any fields for the handshake. Try again.
* warning: Invalid argument supplied for foreach() in /home/iblogger/public_html/sites/all/modules/nf_handshake/nf_handshake.module on line 2821.
also i selected cck fields to appear to share
however they do not appear in the are to select what fields to share
thank you

#1
First, why would you try to submit or accept handshakes if the fields for selection aren't even showing up? And if they aren't showing up, why did you post the errors for making handshakes? It should be obvious that you need to solve the problem of getting the fields to show up for selection before any handshake submit/accept problems. Looking at the lines you mention, it basically tells me that you haven't set up any cck fields to share.
So why don't you list the process you went through in setting up which fields would be shared and what isn't working about that. Don't put the cart before the horse.
#2
well in the handshake settings, the fields appear and selected, however the fields do not appear to choose which fields to share and which not when i try to handshake
#3
So, you're saying that the "Choose CCK fields" tab shows the selections that you've made, and the "Overview" tab also reflects those selections, but that there are no choices to select fields when initiating a handshake.
What that sounds like is that perhaps the user initiating the handshake has not yet created a page with that content on it.
So, what is the name of the content type that holds the CCK fields you want to share, and did the user create a node of that type?
Normally, there should be a disabled checkbox with a note that says "No value entered" if the user doesn't hasn't created that kind of node, but perhaps I failed to consider the case where no nodes of any type containing shareable fields have been created.
#4
the node created with cck is called "profile", however i uninstalled the handshake module, and during uninstallation i go an error saying cannot delete the cck variable. i think the error came from that i clicked once to shake before creating a node, but after that when i made right, the database error was already there.
i will redo everything from the start and give u feedback.
#5
It would explain everything if for some reason the variable "nf_handshake_cckfieldnames" was not being stored to the variables table in your database. There are three variables that should be created. The other two are "nf_handshake_groupnames" and "nf_handshake_settings".
So next time you set this up, please check for their creation when you make the cck field associations.
Thanks.
#6
I did uninstall handshake, created all things from the start, new profile content type, set it as a node type, new cck fields, installed the handshake module, did set one field as a test in the overview tab.
made sure that both users who will handshake have these fields set.
loged in with one user, tried to shake hand , i got this error, although the fields set to share appeared, but it said (No Value Entered) and at the top of the page the following error came
warning: Invalid argument supplied for foreach() in /home/iblogger/public_html/sites/all/modules/nf_handshake/nf_handshake.module on line 1921.
ps, the field i tried to share is taxonomy type, that is saved in taxonmoy only, not in both cck table and taxonmy, iwill try to share another field and give u feedback
#7
i was right when i did set the field to save its value in both cck and taxonomy, it worked
however the table showed
data to share
country (the taxonomy field label) 182 (the taxonomy field data number , whci is supposed to be let's say germany for example)
the question arises, how to make the data to share appear not its value in the table , also what if users do not fill their data will they get error ?
thanks
#8
i shaked hand with many fields and it worked quiet okay, however when clicking to see the user profile, i see a page with the data shared, and not the original usernode page nor the nodeprofile page, also i cannot see the user's picture.
#9
Glad to see some progress. Note that this module is version 0.9 for the reason that it's not necessarily finished.
When you said:
I'm hoping you meant that you created the content type for each user and filled it with data. Also, are these content types nodeprofiles as used in the nodeprofile module? I did make that a requirement, didn't I? And you set them with a maximum population of 1 per user?
Okay, the note that says "No Value Entered" means that that particular user has either not created that content type, or has left the value blank and therefore cannot share what he doesn't have.
I will check the line number you mentioned caused the error.
Also, I noticed myself that I'm not properly calling the cck display functions and so values are being shown incorrectly in some cases. That is on the top of my list to fix.
I'm not sure of the behavior when no content type has been created by the user. I haven't had that issue myself because I created this module to work with another of mine which demands that those content types (the nodeprofiles) be created before the user can do anything. So all of my users have them created every time. I will need to go through the code to make sure I account for the cases when users haven't yet created their content type and show them a warning or something.
As for not showing the regular user profile page, didn't I mention that in the README? It completely overrides the regular page. The reason is that, in my installation at least, I didn't need the other data to be seen. I use a cck field for the user's picture to share via handshake. But perhaps I should give the admin the option of including at least the original account view page, if not an itemized listing of what's on the page, for the users to handshake with. That way the handshake stuff could just be added to the page. Please open a feature request for that so I don't forget. Call it: "Allow users to share original account page".
In looking at the data on that page, I'm not sure why you would want to do that. All there is normally is History, Groups, Private messages, User points and a photo - depending on which modules are installed and what permissions one has. Most of that isn't share-worthy if you ask me.
Something you mentioned bothers me and I wonder if it could be the source of your problems. You mention using Usernodes. Why? What are you using them for? They aren't used by my module. At least, that is, they wouldn't be used if you can't set them as nodeprofile content types. Typically, you would simply create a new content type from scratch and require that all users create one. That's what my registration mod module does.
#10
I guess you didn't have anything else to say...closing this issue.