notice: Undefined index: default_format in /home/.dez/xxx/xxx.com/drupal6/modules/filter/filter.module on line 498.
* What are the steps required to reproduce the bug?
Administer > Site configuration > Input formats
Changed default Input format from Filtered HTML to Full HTML.
* What behavior were you expecting?
Not to have this error pop up. I got the following confirmation:
-The input format settings have been updated.
But the warning followed afterwards..
* What happened instead?
Should change the input format without the notice warning.
Please include as much information as you can:
OS = Windows Vista Business Edition
webserver name and version = Apache/2.0.54 (Unix) PHP/4.4.7 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2
PHP version = PHP Version 4.4.7
Drupal version = 6.0-dev
Drupal path = admin/settings/filters
and everything else you might feel is relevant
-> MySQL: 5.0.24a
-> The default did change and save correctly.
-> Warning would not come back when changed between different filters.
-> Warning would come back when I add/remove roles from the filtered HTML filter.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | filter-notice-161351-2.patch | 824 bytes | mlsamuelson |
| #1 | filter-notice-161351-1.patch | 1009 bytes | webchick |
Comments
Comment #1
webchickWow, what a nice, thorough bug report! :D
I wasn't able to reproduce this notice on changing the default input format, but rather by clicking "configure" on the format which is NOT the default input format and saving the form. This patch seems to fix it.
Two things:
1) I downgraded this to 'minor' because a 'notice' (even though it looks scary) is just a minor error. warnings or errors are more severe, and warrant a higher status.
2) Unless you really, really, really know what you're doing, you should NEVER make Full HTML the default input format! Full HTML bypasses the various XSS and other security checking, and the default input format is usable by ALL roles, including anonymous users. This means that a malicious person could come along to your site, post a comment with some tricky JavaScript in it, and start stealing peoples' cookies and such. A much better approach is to configure the Filtered HTML input format to specifically include the tags you want people to post.
Comment #2
mlsamuelson commentedAppears to be a straightforward patch. It applied cleanly, and resolved the issue as described by webchick.
mlsamuelson
Comment #3
mlsamuelson commentedAppears to be a straightforward patch. It applied cleanly, and resolved the issue as described by webchick.
mlsamuelson
Comment #4
mlsamuelson commentedThis appears to be a straightforward patch. It applied cleanly, and resolved the issue as described by webchick.
mlsamuelson
Comment #5
mlsamuelson commentedSorry about the duplicate postings. The site kept giving me errors, so I'd go back, and submit again... my apologies.
mlsamuelson
Comment #6
dries commentedIt's kind of a long line now. Would be nice to split that up a little, and to move the check to its own line/statement.
Comment #7
mlsamuelson commentedI've attached a new patch which moves the check to its own line by restructuring the code to use if/else syntax rather than ternary operator syntax.
Hope this is what you had in mind...
Comment #8
gábor hojtsyLooks good, committed.
Comment #9
(not verified) commented