The setting for the URL filter length never comes out of input_formats_get_settings, because the code overwrites its own array:
foreach ($list as $filter) {
$form_module = module_invoke($filter->module, 'filter', 'settings', $filter->delta, $input_format->format);
if (isset($form_module) && is_array($form_module)) {
$module_variables = array();
input_formats_api_walk_form($form_module, $module_variables);
// !!! Core filter module provides 4 filters, so using the module
// name as key is not safe.
// You get the setting for URL filter length, then clobber it with the HTML filter's settings.
$variables[$filter->module] = $module_variables;
}
if (!isset($modules[$filter->module])) {
$modules[$filter->module] = array();
}
$modules[$filter->module][] = $filter->delta;
}
Comments
Comment #1
dagmarHm, really interesting, I never saw that.
Well, what do you think @joachim, merging the array with the previous arrays variable would work? After all the variable names are different.
Comment #2
joachim commentedI was going for:
The filter list already comes keyed as MODULE/DELTA, so that's safe to key by.
But I'm not sure on what happens to that array further down, so your solution could be just as good :)
Comment #3
nterbogt commentedThis issue is causing me, well, issues :) Is there a timeframe for when this might be fixed and pushed into a release?
Comment #4
joachim commentedIf you look at the 6.x-2.x branch (currently only in git) I've started work on an API module. I'd forgotten about this problem, but I changed the way settings are arranged in the filter info array, and I seem to remember seeing the URL filter length in there when testing!
Comment #5
nterbogt commentedThat's great news.
Something else that has been bothering me, but may be able to be resolved with 2.x is that you can't revert an input format in the database back to what is on the filesystem. Once an input format has been changed in the database, it seems to stay there. Even if the values are exactly the same as what is on the filesystem, features shows it as 'Default' but the input format page shows it as 'Overridden'.
Happy to create a new issue for this if you would prefer.