Doesn't affect block content
Rowanw - May 12, 2008 - 01:45
| Project: | Filter Default |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
If you set up a default format it will only affect comments and nodes, blocks appear to be ignored.
I assume it has something to do with the function _filter_default_is_new.
I might action this when I get time.

#1
Any luck with this? It's causing me a huge headache!
#2
The solution is simple, I'll add the code inline as well as in a patch...
Find this code in filter_default.module:
<?php
function _filter_default_is_new($form_id, $form) {
switch ($form['#id']) {
case 'comment-form':
return empty($form['cid']['#value']);
case 'node-form':
return empty($form['nid']['#value']);
}
return FALSE;
}
?>
And add the following two lines alongside the existing 'case' statements:
<?phpcase 'block-box-form':
return empty($form['bid']['#value']);
?>
#3
That worked great, thanks. Any chance of making that an official change so we don't have to worry about it at the next update?
#4
It's up to the maintainer, bjaspan, to update the module.
#5
Thanks for the patch. This is fixed in CVS. There's talk over in #108900 that made me a little bit cautious about committing it, but I think this is pretty safe.
#6
Thanks. I have a few hundred users using this module now and it's nice to know I won't have to manually edit this in the next update.
#7
Automatically closed -- issue fixed for two weeks with no activity.