Problem/Motivation
filter_list_format uses an internal cache identifier called "all". A user can create a filter with a machine name of "all" which when used will cause repeated warnings as follows:
Notice: Trying to get property of non-object in check_markup() (line 749 of modules/filter/filter.module).
Notice: Trying to get property of non-object in check_markup() (line 757 of modules/filter/filter.module).
Proposed resolution
There are two possible solutions.
1. stop users being able to create filter with a machine name of "all".
2. change the internal cache identifier so that it is not a valid machine name.
Option 2 is preferred as it has no user visible impact. As the cache identifier is a machine name changing it from "all" to "ALL" is sufficient to resolve the problem.
Remaining tasks
I have a patch attached which implements option 2.
User interface changes
None
API changes
None
Comment | File | Size | Author |
---|---|---|---|
#4 | filter-name-all-with-test-1352636-4.patch | 4.34 KB | applicity_sam |
#3 | filter-name-all-1352636-3.patch | 2.82 KB | applicity_sam |
#1 | filter-name-all-1352636-1.patch | 1.32 KB | applicity_sam |
Comments
Comment #1
applicity_sam CreditAttribution: applicity_sam commentedPatch to resolve the issue by changing the internal cache identifier to upper case.
Comment #2
applicity_sam CreditAttribution: applicity_sam commentedComment #3
applicity_sam CreditAttribution: applicity_sam commentedIssue is also in D8 so here is a patch for it. Test to follow.
Comment #4
applicity_sam CreditAttribution: applicity_sam commentedAttached patch has a fix for the problem in 8 as well as a test that tests that we have fixed the problem,
Comment #5
kscheirer#4: filter-name-all-with-test-1352636-4.patch queued for re-testing.
Comment #6
kscheirerRetesting against latest HEAD since it has been over a year.
Comment #8
Wim LeersThis must've been fixed in the meantime in Drupal 8.
Thus, this must be a D7-only bug. Moving back to D7.
Comment #9
Wim LeersOops.