I'm using the latest version of this great module.

Unfortunately I'm not able to solve a simple issue:

- I created to fieldgroups with some CCK fields.
- I set the type of the fieldgroups to "vertical tabs"
- I moved the fieldgroups to the top of the cck group settings

Although, the "Authoring information" and the "Publishing options" are on the first position. How can I change this? I would like to have "Addressdetails" on the first position.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid’s picture

You'd need something to expose the 'Authoring Information' and 'Publishing Options' fieldsets to CCK. Otherwise they're always going to be stuck first and you can't put anything 'above' them in vertical tabs since they'll always have the lowest weight.

ayalon’s picture

And how can I do that? These fieldsets are in the node.pages.inc of the core so I cannot modify these fieldsets.

Dave Reid’s picture

Title: Order vertical tabs » Expose node.module's authoring and publishing fieldsets to content_content_extra_fields()
Project: Vertical Tabs » Content Construction Kit (CCK)
Version: 6.x-1.x-dev » 6.x-2.x-dev
Component: Documentation » content.module
Status: Active » Needs review
FileSize
1.24 KB

Moving this to the CCK issue queue...

I apologize if this is by design, but I tried searching for a duplicate issue and couldn't find one. Is there a reason that the 'Authoring information' and 'Publishing options' fieldsets are not added on behalf of node.module in content_content_extra_fields()? It seems really odd to provide the Revision fieldset, but not the others.

Dave Reid’s picture

Tested this patch and it allowed me to put fieldsets above all the node.module fieldsets.

ayalon’s picture

Thanks! I'll test the patch! Are you always as lightning fast? :-)

ayalon’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
16.6 KB
23.54 KB

I'm speechless! You are a real drupal expert / specialist / crack what ever! Thanks alot!

The patch works perfect on the first try.

I'm really astonished, that no one complained about this!

Can this be included in the next dev version?

t.lan’s picture

Subscribing - Will this patch make it into the nxt version?

DamienMcKenna’s picture

+1 for inclusion in the next release.

moritzz’s picture

Looks good.
+1 for inclusion in the next release.

KarenS’s picture

Status: Reviewed & tested by the community » Fixed

I actually put this in a long long time ago and it got taken out because it has no effect on normal node forms. It does however do something if you use vertical tabs. I went ahead and added this back in. Hopefully I won't get too much grief for introducing this change so late in the cycle. The weights are high enough that the new fields should stay at the bottom unless you deliberately move them, which I hope means nothing unexpected will happen to existing forms.

yched’s picture

It's a bit far now, but it kinds of rings a vague bell. If having those items reorderable has no effect without VT, then would it make sense to let VT module take care of exposing them as reorderable ?

Dave Reid’s picture

Are we sure that this doesn't have any affect without VT? Doesn't it set the #weight properties also? Even if you're not using VT, this would still allow the fieldsets themselves to be re-ordered.

The reason I pushed for this here is because there are x other modules that could do whiz-bang stuff with node edit forms. Vertical tabs is only one of them. Do we want to duplicate code, or put the support at the root? Plus it's really odd that we'd leave out author and option fieldsets and only support the revision fieldset. Why not all of them?

KarenS’s picture

What I mean to say is that the core code ignores the weights for some reason so they have no effect (it's been a long time, I forget exactly what was going one). So, there may be other modules that do things with them and custom code could also.

It does seem like this is the right place for this code, since CCK is doing the same thing for other core fields. It's just really late in the cycle to be doing this. And Drupal 7 is different, I forget what is being done there, you'd have to see if you need something done in core in D7.

This is one of those issues I could have done a won't fix on, but it seemed so logical to have it in that I went ahead. I can pull it back out if yched thinks this is a bad idea.

Status: Fixed » Closed (fixed)

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

cousin_itt’s picture

Authoring information and Publishing options would not obey CCK reordering until I overrode theme_node_form() in node.pages.inc in my therme (MYTHEME_node_form() in template.php)
I just had to remove the code where the $admin content was built.