User login

form_alter

Clean up and rationalize Drupal core Taxonomy Term Add and Edit form

I can't believe no one has done this!

Simplify the taxonomy interface for administrators by removing the taxonomy related terms box...

drupal taxonomy hide related terms
drupal form tweaks remove related terms

The commit message upon completion...

"Clean taxonomy term add / edit form by removing related terms and moving parents from the closed advanced fieldset to the open identification fieldset if the vocabulary has already been made hierarchical."

And the code:

"Content profile registration broken": debugging rogue form validate overrides

Bad coding in a development partner's custom module was the culprit. It was overriding content_profile_registration's setting of a validation function (and every other module's, too).

Inside the custom module's implementation of hook_form_alter() lives the error:

A fatal error without any of your code in the backtrace: check your form_alter

Fatal error: Cannot use string offset as an array in /home/ben/code/pdonline/drupal/includes/form.inc on line 976
Call Stack
# Time Memory Function Location
1 0.0019 64260 {main}( ) ../index.php:0
2 2.7990 23389320 menu_execute_active_handler( ) ../index.php:18
3 2.8490 23579028 call_user_func_array ( ) ../menu.inc:348
4 2.8490 23579192 node_add( ) ../menu.inc:0
5 2.8490 23580296 drupal_get_form( ) ../node.pages.inc:58
6 3.3649 29258140 drupal_process_form( ) ../form.inc:119

Not seeing CCK fieldsets when you form_alter your form?

In #drupal channel on IRC, mikey_p reminds that the CCK fieldgroup module has a weight of 9, so your module implementing hook_form_alter has to have a heavier weight (higher number) if you want to see that.

Resolution

Syndicate content