After updating to the last hide_submit version last week we're experiencing javascript errors on some pages. This is because hook_form_alter is only fired on non-cached forms. I'm not sure if this is a quirk of our site or a drupal thing, but I created a patch which replaces drupal_add_js with $form{'#attached'] that fixes the problem for us.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SpaghettiBolognese created an issue. See original summary.

SpaghettiBolognese’s picture

Assigned: SpaghettiBolognese » Unassigned
Status: Active » Needs review
FileSize
1.43 KB
jjsanz’s picture

Status: Needs review » Reviewed & tested by the community

This patch solved the problem for me.