Project:Filter Default
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

Comments

#1

Any luck with this? It's causing me a huge headache!

#2

Status:active» needs review

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:

<?php
   
case 'block-box-form':
      return empty(
$form['bid']['#value']);
?>
AttachmentSize
filter_default_blocks.patch 633 bytes

#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

Status:needs review» reviewed & tested by the community

It's up to the maintainer, bjaspan, to update the module.

#5

Status:reviewed & tested by the community» fixed

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

Status:fixed» closed (fixed)

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