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

Goosemoose - July 15, 2008 - 08:10

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

#2

Rowanw - July 15, 2008 - 11:15
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

Goosemoose - July 15, 2008 - 22:02

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

Rowanw - July 15, 2008 - 22:15
Status:needs review» reviewed & tested by the community

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

#5

chellman - August 24, 2008 - 06:27
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

Goosemoose - September 7, 2008 - 01:10

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

Anonymous (not verified) - September 21, 2008 - 01:11
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.