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

CommentFileSizeAuthor
#12 registerprofile_0.patch641 bytesliquidcms

Comments

sym’s picture

Have you installed nodeprofile and do you have at least 1 profile type set up?

jwilde’s picture

Hi,

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

sym’s picture

Sorry, 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

jwilde’s picture

Hi,

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

jwilde’s picture

Hi,

ok, I got it working. Is there a way to display the taxonomy that is tied to the profile?

Thanks,

Jim

sym’s picture

How 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.

jwilde’s picture

Hi 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

sym’s picture

I 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.

jwilde’s picture

Hi,

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

sym’s picture

Status: Active » Fixed

This has been fixed now :)

liquidcms’s picture

Status: Fixed » Postponed (maintainer needs more info)

sorry, but what was the fix for this:

i get:

warning: Invalid argument supplied for foreach() in C:\Inetpub\websites\liquidcms\modules\registerprofile\registerprofile.module on line 36.

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?

liquidcms’s picture

StatusFileSize
new641 bytes

well 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

enboig’s picture

I 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

sym’s picture

Status: Postponed (maintainer needs more info) » Fixed

This 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

csc4’s picture

Are you sure? I had exactly the same error and had set up the permissions, what I hadn't done was selected a nodeprofile node.

sym’s picture

On the first line of the readme file it says:

"NOTE: For this module to work, you must have nodeprofile.module installed and working first."

csc4’s picture

And 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.

Anonymous’s picture

Status: Fixed » Closed (fixed)
kaushik_sarkar@drupal.org’s picture

Title: Registerprofile bug » I need Registerprofile for Drupal 5.1
Assigned: Unassigned » kaushik_sarkar@drupal.org
Category: bug » feature
Priority: Normal » Critical
Status: Closed (fixed) » Postponed (maintainer needs more info)

I need updation of Registerprofile for Drupal 5.1 or please tell me how to update registerprofile 4.7.6 for drupal 5.1

Project: » Lost & found issues

This issue’s project has disappeared. Most likely, it was a sandbox project, which can be deleted by its maintainer. See the Lost & found issues project page for more details. (The missing project ID was 100975)