Hi Sym,
Thanks for the module. I tried it out this morning and I get this error...
warning: Invalid argument supplied for foreach() in /home/mysite/public_html/sandbox/modules/registerprofile/registerprofile.module on line 36.
jim
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | registerprofile_0.patch | 641 bytes | liquidcms |
Comments
Comment #1
sym commentedHave you installed nodeprofile and do you have at least 1 profile type set up?
Comment #2
jwilde commentedHi,
Yes, I have one profile set up, I used cck and nodeprofile to create it. I get the error trying to register as a new user.
Thanks for your help.
Jim
Comment #3
sym commentedSorry, I should have said this before. Have you checked the correct box in admin > access control?
The module is building an array of all the nodes that are a nodeprofile and can be seen on the register page, as set in access control.
If that doesn't work, can you tell me what versions of the modules you are using?
Thanks
Comment #4
jwilde commentedHi,
I checked in admin/access "view content_my_profile on register form".
// $Id: nodeprofile.module,v 1.6 2006/08/09 08:18:22 fago Exp $ and register profile module from 12/2/06.
running 4.7.4.
Thanks for your help.
jim
Comment #5
jwilde commentedHi,
ok, I got it working. Is there a way to display the taxonomy that is tied to the profile?
Thanks,
Jim
Comment #6
sym commentedHow did you get it working?
I'm not sure why is wasn't in the first place - so I'd like to know how you fixed it. Did you change any code?
I've not tried taxonomy with profiles, so I don't know, but if it doesn't work by just creating a container and terms for that node type then I guess not.
I'm sure I could call some taxonomy hook to display the term though. I will try to have a look at it ASAP.
Comment #7
jwilde commentedHi Sym,
Thanks for getting back to me so quick. As you said, "setting permissions". I didn't have them all set correctly.
Taxonomy hooks would be great since we'd be able to make it much more robust for setting up user profiles and working with views. For example, I have four separate small vocabs for user profiles. The problem is that users fill out the form after registration.
Let me know what you think it will take to add the hooks.
Thank you for your time.
Jim
Comment #8
sym commentedI don't know much about how taxonomy works, so I'll have to have a read though it.
Out of interest, what is it you do with the profile taxonomy? Whilst I'm looking at adding taxonomy data, could you just add a drop down field to the CCK content type and use views to display the profiles based on the value of that field? It's not a great solution, but you could get it to work.
Comment #9
jwilde commentedHi,
Yeah, I tried your idea earlier, it works, but the problem is that it does not tie users together with a link. In other words, the text is not a link to a category. Plus, there is no way to use free tagging.
Thanks for your interest. Let me know about taxonomy. I might be able to help you.
Jim
Comment #10
sym commentedThis has been fixed now :)
Comment #11
liquidcms commentedsorry, but what was the fix for this:
i get:
this is what i have set up:
- 2 node types "member" and "company"
- both are set to be usernodes
- i am using rolesignup
- so under registerprofile i think i set access priv for content_member for role "member"
- and access priv for content_company for role "company"
- and under rolesignup i set "register for role" for both "member" role and "company" role
BTW - i get this error when i select either /user/register/role/5 (member) or role/6 (company).
was there code required to fix this or is is just "settnig permisssions" as jwilde states... are there other premissions than what i have mentioned here?
Comment #12
liquidcms commentedwell sym did suggest it was fixed - but pretty sure i have the latest code (Dec 2) although he psoted that it was fixed on Jan 3 - so i guess i just dont know where the fix is.
anyway, there is/was a bug and here is the patch
Comment #13
enboig commentedI recive this error:
warning: Invalid argument supplied for foreach() in /home/escolcat/drupal/modules/registerprofile/registerprofile.module on line 36.
I tried this patch:
--- registerprofile.module.orig 2006-12-02 12:10:14.000000000 -0500
+++ registerprofile.module 2007-01-08 01:38:31.993000000 -0500
@@ -26,7 +26,7 @@ function registerprofile_user($op, &$edi
}
$query = db_query("SELECT perm FROM {permission} WHERE rid=%s", $role);
$result = db_fetch_object($query);
- if (strpos($result->perm, "view ".$type." on register form")) {
+ if (strpos($result->perm, "view ".$type." on register form") !== false) {
(object)$node->type = $type;
$node->type_name = $type_name;
$profile_types[] = $node;
but the problem continues
Comment #14
sym commentedThis is a problem only caused when you have not set up the permissions. I could change the code so that the error isn't displayed, but that would not make the module work, as you need to enable some roles.
It's all in the readme file, but in short you need to go to admin > access control and change what profiles can be seen on the register page. If you have rolesignup installed as well then you can select what roles, without it just select anonymous
Comment #15
csc4 commentedAre you sure? I had exactly the same error and had set up the permissions, what I hadn't done was selected a nodeprofile node.
Comment #16
sym commentedOn the first line of the readme file it says:
"NOTE: For this module to work, you must have nodeprofile.module installed and working first."
Comment #17
csc4 commentedAnd that's a reason for not trapping an empty return?
I did have the module setup - and working - I simply didn't have anything selected which is quite easy to do.
Comment #18
(not verified) commentedComment #19
kaushik_sarkar@drupal.org commentedI need updation of Registerprofile for Drupal 5.1 or please tell me how to update registerprofile 4.7.6 for drupal 5.1