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.
#prefix is rendered inside form tags when a theme_form_id function exists.
To reproduce: add a #prefix to the node submission form, view source and observe that it is rendered inside the form tag. Next, remove / rename theme_node_form and observe that the prefix is correctly rendered outside the form tag.
Comment | File | Size | Author |
---|---|---|---|
#12 | form_inc.patch | 1.53 KB | chx |
#7 | drupal_render_theme_prefix.patch | 1.41 KB | chx |
#2 | exp.patch.txt | 978 bytes | Heine |
Comments
Comment #1
Heine CreditAttribution: Heine commentedNote: it doesn't just happen to the node submission form; try the following with and without theme_test_form().
Comment #2
Heine CreditAttribution: Heine commentedExperimental, so no 'needs review'. Patch takes the approach that prefixes cannot be touched by the elements theme function.
Comment #3
anders.fajerson CreditAttribution: anders.fajerson commentedThis indeed makes the patch in http://drupal.org/node/100775 work. Can't really comment on the implementation, but I'm tempted to set this as critical.
Comment #4
anders.fajerson CreditAttribution: anders.fajerson commentedSorry, missed the "no" in "so no 'needs review'.
Comment #5
Heine CreditAttribution: Heine commentedApart from having an inconsistent and broken implementation, consequences of this bug are:
Comment #6
Heine CreditAttribution: Heine commentedComment #7
chx CreditAttribution: chx commentedComment #8
Heine CreditAttribution: Heine commented#7 is much more elegant. This patch (or similar) needs to go into Drupal 5 because our javascript may break when divs are moving around when someone creates a theme_form_id override (upload, collapse).
#7 fixes the issue and did not introduce other problems during testing.
Comment #9
Dries CreditAttribution: Dries commentedIt's hard to understand/grok that change. What exactly is going on? Inheritance? And can we document that in the code?
Comment #10
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD.
I think this needs to be backported so changing the version. :)
Comment #11
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedchx will re-roll later
Comment #12
chx CreditAttribution: chx commentedIndeed he will.
Comment #13
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedapplied
Comment #14
dwwFYI: the only "downside" of this patch is that modules which used to use #prefix to add a div to their node form used to see the divs in this order: .node-form .custom. now, it's reversed: .custom .node-form. this has been screwing up the CSS for the project_release [1] and project_issue [2] UI. not the end of the world, but just thought i'd mention it. ;) i already documented this at http://drupal.org/node/64279#prefix when i ran into it during the 5.x port of project*, but it appears this is now an issue for 4.7.4 -> 4.7.5 porting, too. should we add such a page? anything else change between 4.7.4 and 4.7.5 that needs documentation like this?
thanks,
-derek
[1] http://drupal.org/node/105228
[2] http://drupal.org/node/105229
Comment #15
dwwhttp://drupal.org/node/105960 is now there.
setting everything back for posterity.
Comment #16
(not verified) CreditAttribution: commented