Hi,
encouraged by the module maintainer, I have thought about and created a better solution for the "no format will remain" issue. Also, there was an issue with wysiwyg.module; whenever Drupal originally provided more than one filter format but filterbynodetype.module reduced the set to only one. This was caused by an incorrect imitation of the format hints section.
I have created a patch which:
* improves the imitation of the "one format only" format section
* makes sure the current(!) site default filter format is always being provided as this is a core behavior that should not be overridable, even if it is not configured active in the per-nodetype-settings. I did not touch the node type edit form btw, because the standard format can change while the node type based formats don't. I think this solution is closest to Drupal core intentions.
* would not interact if format count is already reduced to one. Any such situation would be a fault by the site admin which to override is less dangerous than not providing anything at all. Also is there no big security issue as one format would always BE the current site default format by core. So if the admin would set up a dangerous format as site default, he is not into security anyhow.
To even improve the 2 latter points I would suggest to implement a "always force at least one filter" admin option.
Find my patch attached, I have tested it working in several different combinations with and without wysiwyg.module.
Hopefully you will share my opinion and commit it.
Cheers!
| Comment | File | Size | Author |
|---|---|---|---|
| filterbynodetype.default_format.patch | 5.47 KB | doitDave |
Comments
Comment #1
doitDave commentedComment #2
doitDave commentedComment #3
doitDave commentedUps. Ok. Now that I've herited this module, I will update the sources asap to apply the patch. Hope this will still help someone :)
Comment #4
doitDave commentedFixed in dev snapshots and releases after Dec. 19, 2012.