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.

CommentFileSizeAuthor
captcha_placement.patch2.52 KBPancho
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

soxofaan’s picture

Component: Captcha API (captcha) » Code
Status: Needs review » Fixed

This 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

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.