I noticed that the placement of the Captcha section doesn't work at all. The Captcha is placed somewhere but not right above the buttons.
The reason is that we are adding captcha_pre_render_place_captcha() only to the Captcha section, therefore it only collects the weights of all buttons within the Captcha section (= none). Correct would be to collect the weights of the buttons in the whole parent form.
This fixes placement for most but not all forms. The exception is the node edit form - while placement is slightly improved, it is still not right above the two buttons.
This is because in node_form() the buttons don't receive a correct weight. It is only in theme_node_form() that the 'buttons' section (as well as 'author' and 'options') is "manually" positioned overriding any weights and therefore unavailable for weight calculation.
IMHO this is a core API bug which should be filed against core.
For now, this patch seems to be the best we can do now. Think it would make sense to commit it, so Captcha can be rolled out for D6.
Comment | File | Size | Author |
---|---|---|---|
captcha_placement.patch | 2.52 KB | Pancho | |
Comments
Comment #1
soxofaan CreditAttribution: soxofaan commentedThis bug was introduced during the Drupal 6 port. Issue does not exist in 5.x-3.x branch.
I added small fix for node add forms
http://drupal.org/cvs?commit=94764
thanks
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.