module not working?
xjm - August 6, 2007 - 15:41
| Project: | Default Filter |
| Version: | 5.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | dllh |
| Status: | closed |
Description
I think the concept for this module is much better than other modules available; however, it doesn't seem to be doing anything. I've installed the module and added a filter assocication at admin/settings/default_filter, for page nodes, the administrator role, and an "extended filtered HTML" input format that I have. However, when I go to create a new page node, the input format is still defaulting to the sitewide default (filtered HTML). Any suggestions on what I might need to do differently?
Thanks in advance.

#1
What browser are you using? I've had another report that this doesn't work properly in IE.
#2
I've checked in a fix for this issue. I wasn't unsetting the previously checked radio button, and the result was multiple buttons with 'checked="checked"'. This works in Firefox b/c it apparently defaults to the last selected item in this scenario; IE apparently defaults to the first. I now unset all buttons prior to applying the admin-set default. Verified fixed in IE6. You should be able to get the change from CVS (http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/default_fil...) immediately or via release whenever Drupal's system next builds a release.
#3
I don't run IE in Suse or OS X. ;-) It did not work for me in Firefox or Konqueror.
#4
Were you able to try out the fix, and if so, did it work? It worked for me with a Gecko browser out of the gate, so I'm perplexed that it didn't work in Firefox. If it's still not working, please verify that the role for which you've selected the filter actually has permission to use the filter. The module should only select filters that a given user has been granted access to in the filter administration.
#5
After updating module I've got the error:
warning: Invalid argument supplied for foreach() in /modules/default_filter/default_filter.module on line 207
Module don't work for me.
#6
i can confirm the error:
warning: Invalid argument supplied for foreach() in modules/default_filter/default_filter.module on line 207.
#7
this helped me
#8
Error message don't show, but module still don't work - default filter won't selected (tested with IE and FF).
#9
Well, this is very strange. The patch attached in comment 7 uses the array key "format" where my original code uses "filter." When I tried the patch out on my install, it didn't work. So it seems that something's going on with that key. Can some of you who're reporting breakage confirm that you're using drupal 5.1? And can anybody shed any light on this weird discrepancy? I guess I could add an admin setting that lets you dictate what key to use, but that's not going to be terribly user-friendly for people who aren't comfortable viewing source to find what key is being used. I could also check for both keys and use whichever exists, but that doesn't handle any other weird cases. I'm open to feedback.
#10
Ok, I've added some code that checks for both the "filter" key and the "format" key in the $form array and tries to use whichever exists. I can't really test because I can't duplicate the issue you guys are having, but I can verify that the code doesn't break my install, which is a good start. Please test and let me know if it works. Also, if anybody has any thoughts on why this discrepancy is occurring, I'm all ears. When I was developing this module, I did some print_r debug statements in node_form() to see what keys to use; that's how I arrived at "filter." Tentatively marking this fixed, pending confirmation from somebody who can test. The fix is in CVS.
#11
I'm using Drupal 5.2
After updating module to version 1.4 and deleting all old association on admin/settings/default_filter, I add new one, test it and it's realy work now! Thanks, nice module!
#12