The template for hook_form_alter() should pass $form_state by reference. hook_form_FORM_ID_alter() and hook_form_BASE_FORM_ID_alter() are missing the $form_id variable.

Comments

pfrenssen’s picture

Status: Active » Needs review
StatusFileSize
new1.98 KB
JulienD’s picture

StatusFileSize
new90.21 KB

Good catch. I found the same problem this afternoon :)

I tried to apply your patch but it didn't pass. Maybe there is too many header informations in it ? I hope this lighter version will pass the bot.

Otherwise, why base_form_id for the hook_form_BASE_FORM_ID_alter is named module_name_form_form_id_alter() instead of module_name_form_base_form_id_alter() ?
Why did you don't kept the same syntax ?

Best

pfrenssen’s picture

The patch in #1 was generated with git format-patch. You should be able to apply it with the git am command.

pfrenssen’s picture

I just had the same problem. I could not apply the patch in #1. This problem occurs because the Drupal.xml file has been saved with Windows line endings. When the file is resaved using standard unix line endings the patch applies fine.

I'll file an issue about the line endings.

deekayen’s picture

Status: Needs review » Fixed

committed

Status: Fixed » Closed (fixed)

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