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.

Comments

janusman’s picture

Title: Additional code for proper detection when using » Additional code for proper detection when using Filter by node type module

Missed part of the title.

sun’s picture

Title: Additional code for proper detection when using Filter by node type module » Wrong form structure when reduced to one input format
Project: Wysiwyg » Filter by node type
Version: 6.x-0.5 » 6.x-1.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.

sun’s picture

Status: Active » Needs review
StatusFileSize
new2.72 KB

This works from my testing.

janusman’s picture

Status: Needs review » Reviewed & tested by the community

Tested; marking this as RTBC.

gdd’s picture

Status: Reviewed & tested by the community » Needs work

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.

laddiebuck’s picture

I have this issue too, and am just wondering whether the D5 version will also be patched? Thanks in advance.

doitDave’s picture

Status: Needs work » Fixed

This problem has been fixed in a generally reviewed code I have already comitted. Both releases and dev snapshots from Dec 20, 2012 and later should work as desired. If not, please feel free to reopen this issue. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.