Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently, the Input Format field is implemented as:
$form['site_map_message_format'] = filter_form(variable_get('site_map_message_format', FILTER_FORMAT_DEFAULT));
However this stores the form element under the default name, "format". When system_settings_form
handles the submission it stores the selection in a variable called format
, not site_map_message_format
.
The solution is to implement filter_format
with the parents array site to the form element name... Like this:
$form['site_map_message_format'] = filter_form(variable_get('site_map_message_format', FILTER_FORMAT_DEFAULT), NULL, array('site_map_message_format'));
I can confirm this fix works for the site I'm working on.
Comment | File | Size | Author |
---|---|---|---|
#1 | site_map.input-format-fix.patch | 891 bytes | nicholasThompson |
Comments
Comment #1
nicholasThompsonPatch Attached...
Comment #2
TheUnseen CreditAttribution: TheUnseen commentedThis is still an issue with 6.x-2.1 which I am using.
Could this be addressed, please?
I just needed the Full HTML option to be used so I inserted into drupal_variable manually as a workaround:
Comment #3
frjo CreditAttribution: frjo commentedThanks for reminding me of this!
Committed to 6--2-dev.