I'm using Drupal 6.4 here, and I went to add a new CCK content type to use for user profiles and noticed that the fieldset with the checkbox that enables a content type to be used as a Content Profile is way down at the bottom of the form, even after the submit button. (See attached image.) I feel like the submit button should always be last.

Looking in content_profile.module on line 156, in function content_profile_form_alter I see that that fieldset's weight is set to 32. Setting it to 1 makes this the last fieldset on the form (even with Location and FeedAPI in use), but before the submit button. That's the desired behavior, right? Here's a patch that changes the weight to 1.

Let me know if it's just me that's experiencing this issue or if this happens for everyone.

CommentFileSizeAuthor
fieldset_weight.0.patch694 bytesakahn
Picture 1.png33.72 KBakahn

Comments

akahn’s picture

Status: Active » Needs review

Realized I should mark this as having a patch.

kenorb’s picture

Title: Content Profile fieldset appears below submit button on Content Type add form » How to change custom weight of content type

Solution without any patch:
The problem is that user_register form has set some default weight and we can't change our weight on content type form.
We can change weight of our form or user_register form using form_alter().

Or we can change our weight in form changing hidden settings in content type edit form.
In example using Firefox with Firebug console:
Go to 'Manage fields' and configure your specified form which you want to put before user registration form (e.g. /admin/content/node-type/your_content/groups/some_group)
Run in Firebug Console:
$('#edit-weight')[0].type = 'input'
to show hidden weight and change it e.g. to 0.

fago’s picture

Status: Needs review » Fixed

try the latest dev snapshot, it should work right with it.

kenorb’s picture

Component: Base module » User registration module
kenorb’s picture

Status: Closed (fixed) » Fixed

I've tried lastest snapshot, but it doesn't work for me.
Still form is under 'Create new account' button.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

geraldito’s picture

thanx kenorb for your smart solution using firebug.

nghiadhcntt’s picture

Status: Fixed » Closed (fixed)

Simple disable javascript on your browser and access sorting fields in content type