When a new filter (not yet in the database) is loaded on the filter configuration page, a default filter object is constructed to represent it; among other things, this is passed on to the 'settings callback' of that filter.
This object is not complete - among other things, it is missing the name of the filter itself. This information can be useful; for example, I am currently trying to port a D6 module to D7 which provides two filters that are similar enough that they share a settings callback (but have slight differences, so need to always know which filter they are being called for). There are ways around this, but the simplest is to fix this issue, which is a bug because the mock filter object should not be missing properties that would otherwise be passed in after it has made its way into the database.
Comment | File | Size | Author |
---|---|---|---|
#8 | drupal.filter-filter-new.8.patch | 839 bytes | sun |
#1 | complete-mock-filter-object-826380-1.patch | 837 bytes | David_Rothstein |
Comments
Comment #1
David_Rothstein CreditAttribution: David_Rothstein commentedHere's the patch - this should make the filter object have all the properties it's supposed to have.
Comment #2
sun#1: complete-mock-filter-object-826380-1.patch queued for re-testing.
Comment #4
sun#1: complete-mock-filter-object-826380-1.patch queued for re-testing.
Comment #6
sun#1: complete-mock-filter-object-826380-1.patch queued for re-testing.
Comment #8
sunRe-rolled against HEAD.
Comment #9
David_Rothstein CreditAttribution: David_Rothstein commented#8: drupal.filter-filter-new.8.patch queued for re-testing.
Comment #10
David_Rothstein CreditAttribution: David_Rothstein commentedIf the tests still pass, I think I'm voting RTBC...
Comment #11
sunComment #12
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.