Wrong form structure when reduced to one input format
janusman - December 2, 2008 - 22:05
| Project: | Filter by node type |
| Version: | 6.x-1.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Description
Under my installation, I created a new Input Filter, and using the filterbynodetype module, I designated a content type to use that new filter.
The WYSIWYG module is not detecting myconfiguration, because this evaluates to false:
isset($element['format']['guidelines'])However, $element['guidelines_link'] does exist.
So I changed these two lines adding "|| isset($element['guidelines_link'])" and it seems to work properly:
line 94:
if ((isset($element['#type']) && $element['#type'] == 'fieldset') || isset($element['format']['guidelines']) || isset($element['guidelines_link'])) {
line 139:
if (isset($element['format']['guidelines']) || isset($element['guidelines_link'])) {Perhaps this is not the correct solution, it just worked for me.

#1
Missed part of the title.
#2
$element['guidelines_link']does not conform to Drupal core's form structure:http://api.drupal.org/api/function/filter_form/6
http://api.drupal.org/api/function/theme_filter_tips_more_info/6
http://api.drupal.org/api/function/theme_filter_tips/6
If filterbynodetype alters the form structure, it should make ensure that the resulting structure equals the default output of filter_form().
Please note that this bug only appears when the available input formats are reduced to only one input format.
#3
This works from my testing.
#4
Tested; marking this as RTBC.
#5
I'm clearing out the issue queue in preparation to roll a new release. Is this still an issue? I tried to reproduce it with the dev version of filterbynodetype and the current wysiwyg api and couldn't.
Also some code got moved around so if this could be rerolled it would be helpful.
#6
I have this issue too, and am just wondering whether the D5 version will also be patched? Thanks in advance.