yched points out in #678590: Path alias link is below submit button on taxonomy term add that it would be a good thing if path module implemented hook_field_extra_fields() to allow the user to control the 'URL alias' fieldset on node or taxonomy term forms. Let's do it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid’s picture

Status: Active » Needs review
FileSize
1.16 KB
yched’s picture

Status: Needs review » Needs work

In node forms, the 'url alias' input is in the 'advanced settings' VTs, and, as such, is not reorderable - the VT group sinks at the bottom of the form.

Patch is OK for taxo terms, though.

Dave Reid’s picture

Vertical tabs does not show up if JavaScript is disabled or if the vertical tabs have been removed (yes, it's possible).

yched’s picture

Vertical tabs does not show up if JavaScript is disabled or if the vertical tabs have been removed (yes, it's possible).

Then each fieldset in the VT group must be assigned an individual weight that ensures it sinks low enough in the form when JS is off.
We cannot have Field UI support reordering all the stuff that is currently in node VTs:
- would add much much cruft to the list on 'Manage fields'
- we cannot support moving stuff in or out of VTs
And we cannot have a different set of exposed 'extra fields' depending on whether VT/JS is present or not.

Dave Reid’s picture

I don't think we're quite understanding eachother. If JS is disabled we don't see vertical tabs at all. We see fieldsets. All the fieldsets on the node form do have a weight right now in code.

We cannot support moving stuff in or out of VTs? Why not?

Dave Reid’s picture

Status: Needs work » Needs review

Setting back to needs review.

yched’s picture

We don"t see the VTs with JS off, but they keep structuring the $form that gets rendered, right ? Even if you don't see the VT set, it's still at the top level in the $form, and its weight should control the position of the fieldsets 'as a group', even if the group container (the VT set) is not visible.

At any rate, we cannot have Field UI handle two separate reordering scenarios ('client has JS' / 'client has no JS') to deterrmine what's reorderable or not. If a form element is in a VT, it's not reorderable with JS on, so it cannot be reorderable with JS off either.

Dave Reid’s picture

I don't think it would restructure it? You'd be willing to try it out right? :)

joachim’s picture

> If a form element is in a VT, it's not reorderable with JS on, so it cannot be reorderable with JS off either.

I've tried this with JS turned off, and the weight of the URL alias element has no effect at all on the node form.

So this possibly needs removing from the patch.

Here's a reroll of the above patch at any rate to take into account the hook now needing two things, 'form' and 'display'. Also, URL aliases are an element, not a fieldset in the taxonomy term form.

Dave Reid’s picture

Status: Needs review » Needs work

There is no path element output on display, so we don't need to provide that at all, it's optional. Let's rather sync the descriptions used between node and taxonomy. We don't need two different strings for the same thing.

joachim’s picture

Status: Needs work » Needs review
FileSize
1.01 KB

Oh duh. How right you are!

Here's a reroll. I've followed the pattern node module uses for the node title, 'Node module element'.

joachim’s picture

Given the node bit does nothing AFAICT, and other core modules that provide fieldsets don't provide a hook_field_extra_fields() weighting, should we just drop the node part?

Status: Needs review » Needs work

The last submitted patch, 687994-11.drupal.path_.path-field-extra-fields.patch, failed testing.