Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Since it is possible to have more than 10 fields on taxonomy, the "Relations" form element should either be added dynamically to the form or be allowed to be arranged with the other field items.
See http://screencast.com/t/QLmcHHyNQJ
A temporary solution is to use a hook_form_alter to move the relation around... or to manually edit the configuration items to have negative values. for weight.
Comment | File | Size | Author |
---|---|---|---|
#8 | 2016-01-28_08:00:19-Manageformdisplay|Drupal-GoogleChrome.png | 99.63 KB | generalredneck |
#8 | 2016-01-28_07:51:05-Manageformdisplay|Drupal-GoogleChrome.png | 94.74 KB | generalredneck |
#7 | taxonomy.png | 159.85 KB | gnuget |
#5 | drupal-fix_static_weight_of_relations-2655328-5.patch | 909 bytes | generalredneck |
Comments
Comment #2
gnugetCan you please provide a list of steps to reproduce your problem?
Thanks!
Comment #3
generalredneckNotice the relations form is in the middle of the firm as shown in http://screencast.com/t/QLmcHHyNQJ
Comment #4
generalredneckactually... an easier way is just to go to Manage Form Display for that Vocabulary and make some fields weight 8, and 9, and others 11, and 12.
You will see relations is in the middle of the fields...
Comment #5
generalredneckI stuck Relations at the end of the form regardless of the max weight of the fields in the form display.
Comment #6
generalredneckComment #7
gnugetBy default my inputs start in 30 so the relations form appear in the begining of the form which I think is a expected behaviour:
But indeed having hardcoded the weight of this part of the form limit the ability of the user to order it, because this obligate the user to edit the weights of the form by hand.
I think the right thing to do is not force the "relations" section in the end of the form but expose that field in the "Manage form display" section and let the user decide where he wants to put that part of the form.
Comment #8
generalredneckYour assumption is flawed. The reason why it starts at 30 is because of the Path module. So we can make the assumption that the path alias field is expected be at the top by default...
You can see that here:
However, If I uninstall the path module (like is the case in the minimal profile), then this happens instead.
Ideally, the position should be able to be controlled much like URL Alias is.
Comment #9
PanchoThis is not more than a stop-gap bugfix, though a valid one. A more fundamental solution would follow the line described in #2751001: Expose configuration for Relation. Anyway this goes against the current dev version 8.6.x.
Comment #10
PanchoSorry, 8.5.x is the correct target.
Comment #16
larowlanLet's put our efforts into #3158934: Update taxonomy term base fields (parent and weight) to be configurable on form display instead given you can form alter around it
Comment #18
luiscarvalho CreditAttribution: luiscarvalho at CI&T commentedJust some additional information, Row Weights can accept negative values, so you can manually change the other fields to start at negative so it doesn't hit 10 and conflict with this element. This way you don't need to form alter around it.