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.
This is valid for Omega subtheme & Bartik, 2.x dev and final version
When templating comment, "author" field is uncontrollable: it has no selection of minimal, D default, expert AND it appears as the last field in entity no matter where it is placed or how it is nested.
Some other comment fields are also more-less problematic, but workarounds are easily possible except "author" field.
Comments
Comment #1
swentel CreditAttribution: swentel commentedThis has been in the queue for a couple of times now. DS preprocess fields have exactly this limit re: templates, there's nothing I can do about that. I'll check the weight problem.
Comment #2
PlayfulWolf CreditAttribution: PlayfulWolf commentedif talking about weight there is also the same problem with "Links" field on the node - it does not respect appear in fixed position in current nest (group).
Comment #3
swentel CreditAttribution: swentel commentedAre you using field group ?
Comment #4
PlayfulWolf CreditAttribution: PlayfulWolf commentedYes. Mainly because of ease of adding and other html5 attributes
To overcom ("Links") weight problem it is he best to add it alone to some field group - it does respect field nesting
p.s. seems I use dev version - 7.x-2.x-dev of Field group :/
Comment #5
swentel CreditAttribution: swentel commentedhmm yeah, 7.x-2.x is not supported anymore iirc, let's move this over there
Comment #6
PlayfulWolf CreditAttribution: PlayfulWolf commentedOk, I've downgraded to 1.x - haven't read all the documentation. Links weight problem persists.
Comment #7
PlayfulWolf CreditAttribution: PlayfulWolf commentedCan confirm the same with Field Group 1.x
Comment #8
tim.plunkettJust had this problem as well.
Comment #9
tim.plunkettfield_group_build_pre_render()
callsfield_group_fields_nest()
, which handles moving the fields into their respective groups.Except, #pre_render is before render, which is when the preprocess layer happens, and
template_preprocess_comment()
is where the author field is added.I'm having the same problem with the permalink, which is added in the same place in preprocess.
This still might be a DS bug, in the sense that it is only possible to add those fields when using DS, and it might be neatly solved on the DS end, but I'll have to debug more.
I'm also curious to see if this happens with node elements, and if not, how that is handled.
Comment #10
nils.destoop CreditAttribution: nils.destoop commentedMarking this as duplicate of #2049291: Wrong order of the fields