Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
filter.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Oct 2011 at 13:44 UTC
Updated:
25 Sep 2015 at 19:06 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
franzThis is probably due to performance. filter_format_load() is used by check_markup() to just load minimal information. Then it hits the cache, and if fails, it loads the filters the way you did.
So my guess is that it's an expected behavior. But I have to agree that the documentation is not clear about it and it states a misleading "fully-populated text format object" on it.
Let's get someone else to advice here.
Comment #2
andy inman commentedLikewise, I can understand it being deliberate behaviour for performance reasons. Maybe a solution would be an additional parameter passed to filter_format_load() something like:
Comment #3
franzAdding keyword
Comment #4
traviscarden commentedRe-tagging.
Comment #5
frobThe solution in comment #2 looks like a good one to me.
Comment #6
andy inman commentedTo cater for possible future needs, perhaps better:
Where setting $options['fully_populate'] = TRUE would cause the filter to be fully populated.
Comment #7
franzOk, this patch should do it. Do we need to make a test for it? Or does it only makes sense if we had something to consume this API? I'm thinking we could improve this so that check_markup could use.
Comment #8
andy inman commentedFranz, your work looks good to me - sorry but I have too much going on right now to contribute here.
Comment #9
tim.plunkettThat function was removed from D8
Comment #10
mgiffordComment #11
joshf commentedReroll of #7. Thanks for the patch @franz!
Comment #12
joshf commentedRemoved "fully-populated" from the @return documentation.
Comment #13
joshf commentedFixes up some errors and makes it a little easier to read.