The fieldset on node-forms (choosing a category) has no weight defined.

Previously this was no problem, as it sorted to right place anyway (right below the Body textarea, which I believe is the best place), but now on 5.x there is a problem with CCK content types: User may choose a weight for each custom field, which is then used as the form-item weight directly. The user-selectable range of weight is -10 to +10, but the required Title field is locked to -5 (makes sense - allowing enough space below, but also allowing to put something above if necessary). Now the problem is that Category fieldset lacks of a weight definition, so it defaults to weight 0, leaving only just 4 weights (-4 to -1) between the title and itself for the user, to place custom fields into. Any custom fields with positive weight will show up BELOW the category selector.

I examined the other node-settings-style fieldsets present in the form (from modules path, upload, comment, menu...), and I see that all these are set to weight 30, ensuring to be below any content fields. Considering that category-selection is more important and more content-related (especially when set to required), I propose to set the weight to 20, to keep it just between content and any other settings.

Original Taxonomy have the weight -3, so the selector is then ABOVE content, but this is one of the weird things about Taxonomy, that users don't like (I believe, relying on our website visitors' opinion). Content should be the first in form.

I'm attaching a patch, but I'm not sure if it applies in some automated way, as the change is very close to previous one, and our files may be a bit out of sync now. But however, it only adds one single line, so I hope everything is clear.

CommentFileSizeAuthor
category-weight.patch379 bytesJirkaRybka

Comments

JirkaRybka’s picture

Version: 5.x-1.1 » master
Category: feature » bug
Status: Needs review » Needs work

I took a quick look at the upcoming D6 version in HEAD, and I see the problem is still in there. Also switching this one-liner to bug report, because having NO weight defined is not a good thing. It would be nice to have this fixed for D6 at least :)

Patch applies with offset now (leaving it so today, result still OK).

JirkaRybka’s picture

Status: Needs work » Fixed

I see Category 6.x now have the weight defined. It's the (annoying for me) '-3' weight mirrored from Taxonomy, but - uh - OK. It's standard in Drupal, so be it. I can hook_form_alter() it anyway.

The issue as described here is fixed, so setting status that way.

Status: Fixed » Closed (fixed)

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