Closed (outdated)
Project:
Content Profile
Version:
6.x-1.x-dev
Component:
User registration module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Oct 2008 at 17:08 UTC
Updated:
27 Jun 2018 at 13:33 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
nadavoid commentedI am seeing the same thing. My custom profile fields are showing up above the regular username & email fields, in the user registration form. Please post something here if you find a solution.
Comment #2
nadavoid commentedI have found a workaround for this. If you have a fieldgroup, you will have to go into the database and manually set its weight. This worked for me.
More specifically, in my case, I have a Student Profile content type, and in it I have a group that contains all fields of the content type. I search in my database, the table content_group, column group_name, for the value 'group_personal'. The weight in my case was originally -3. Changing it to 1 moved it below the username and email fields for me, but you may have to try different values to see what positions it properly for you.
I'm wondering if an interface needs to be exposed for managing these weights. It seems to me that the user registration module would be the one to handle that. I'm not sure if it should be changing the weight field of the content_group table. It might have unexpected consequences in how CCK orders its fields and groups, like if a user goes back to managing fields in cck and rearranges fields. So, should we add another weight field somewhere?
I guess the basic request here is that we need a way to manage the order in which the different profile groups appear on the user registration page. This would include content types defined by CCK, profiles defined by the core profile module, and the default username & email fields.
Any thoughts on how this should be handled?
Comment #3
kenorb commentedDuplicated of: http://drupal.org/node/315354
Comment #4
andreiashu commented@kenorb this is not a duplicate for #315354. read again both reports and you will see that this one is different than #315354
In my opinion this is a bug. So i marked it accordingly.
Comment #5
andreiashu commentedIn the edit fields page ('admin/content/node-type/content_type/fields') if you disable javascript you can see that the title field gets a weight of -5 by default, 'Menu settings' -4, body -3, and the 'File attachments' field is -2. When you add your custom field to your content type, it will get by default the weight -1. Here is the problem: when you go to the registration form, all the default fields don't have 'weight' specified (so they get 0 weight by default) but our custom field has: -1.
I attached an ugly workaround that works (at least it does for me).
Comment #6
andreiashu commentedI forgot about groups.
I know that this patch is not at all oki, but i hope that someone will step in and help about this issue. At least (I think) we isolated the bug.
Comment #7
fagoyep, currently just the weights of the form elements inside a node form are taken. Perhaps we could improve this buy multiplying the content profile content type weight * 10 and adding it to each weight of a form element... Or better we could add a theme function for the user registration form and just render the node forms in the right order manually.
Comment #8
fagoComment #9
andreiashu commentedMaybe this can help #341746: Notify user module that we have custom fields
Comment #10
redijedi commentedsubscribing
Comment #11
doublejosh commentedListening.
Comment #12
AmitV-2 commentedsubcribing
Comment #13
geraldito commentedfor testing purposes you can manually edit the weight of every cck content profile field by running this function in Firebug Console (
thanks to kenorb for this hint):
$('#edit-weight')[0].type = 'input'Comment #14
Leonth commentedSubscribing.
EDIT: a possible ugly hack to just set
for user_register form.
Comment #15
Aldus commentedsubscribing, it's very important for advanced profile creation
Comment #16
yurg commentedInspired by #14 (though all thread was helpful!), I've found quick workaround:
1. Add template for user/register form
This goes to template.php, i've used marinelli theme, so marinelli_theme need to be replaced by your theme name
2. Creating user-register.tpl.php file and put followed code inside:
3. Clear theme registry\cache
Here is working "demo":
http://artsfestivals.co.uk/user/register
Thank you all for inspiration!
Comment #17
kenorb commentedDrupal 6 is no longer officially supported. If you think this issue is still relevant for 8.x, feel free to re-open.