Hi,
I really liked this module because it saved me hours of re-inventing the wheel :) but, I've faced a little strange issue, I'm not even sure if this is by design or something directly related to drupal theme layer!
1- create any block whose content is a form (or get any block whose content is a form)
2- add this form to asaf's config
3- add the block in any region you want
4- submit the form
bug description:
the entire block gets replaced after the AJAX call, but what replaces it is only the form not the entire block!
expected behavior:
only the form should be wrapped not the entire block so that when it gets replaced we don't loose the block HTML structure (and hence any style rules attached to those block structures)
what makes me think it might not be a problem with ASAF is because it just uses hook_form_alter and it just adds #prefix and #suffix ... so it all just looks pretty normal :)
maybe I'm rendering my blocks the worng way ? (however, I doubt so because I could reproduce this with Devel's "execute PHP")
Thanks in advance,
Mahmoud
Comments
Comment #1
taldy commentedHello,
I found and fixed it.
It's a pretty strange behavior of block module. It happened because block module uses block.tpl.php as theme wrapper for block content. It sounds good, but doesn't work when block content has #prefix and #suffix properties. In this case block wrapper HTML (block wrapper and block title) is rendered inside form wrapper, and it will be loosed after first form update with asaf.
Currently it fixed in 7.x-1.x-dev, and this fix will be included in the next stable build.