We implemented Video Filter 6.x-2.x on ~450 sites via Features and the WYSIWYG button disappears from the toolbar when updating to 6.x-3.x. This is due to the change in video_filter_wysiwyg_plugin here.

Adding the button again manually via the WYSIWYG module settings form resets this setting and adds the button again. There is no update routine included that does this programmatically when update.php runs, so I can't update these sites to 3.x since all will lose this button from the toolbar. Since the 2.x branch is no longer supported, I am looking for a way to get 3.x working given this issue. Thanks in advance.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

blackdog’s picture

Hmm, not good. Do you know if there is a way to add it back programmatically?

vinmassaro’s picture

The change I can see in the database is in the WYSIWYG table that contains the tinyMCE settings. videofilter changed to video_filter in the serialized settings array with 6.x-3.x.

6.x-2.x

array (
  'default' => 1,
  'user_choose' => 0,
  'show_toggle' => 0,
  'theme' => 'advanced',
  'language' => 'en',
  'buttons' => 
  array (
    'videofilter' => 
    array (
      'videofilter' => 1,
    ),
  ),
  'toolbar_loc' => 'top',
  'toolbar_align' => 'left',
  'path_loc' => 'bottom',
  'resizing' => 1,
  'verify_html' => 1,
  'preformatted' => 0,
  'convert_fonts_to_spans' => 1,
  'remove_linebreaks' => 1,
  'apply_source_formatting' => 0,
  'paste_auto_cleanup_on_paste' => 1,
  'block_formats' => 'h2,h3,p,blockquote',
  'css_setting' => 'theme',
  'css_path' => '',
  'css_classes' => '',
)

6.x-3.x


array (
  'default' => 1,
  'user_choose' => 0,
  'show_toggle' => 0,
  'theme' => 'advanced',
  'language' => 'en',
  'buttons' => 
  array (
    'video_filter' => 
    array (
      'video_filter' => 1,
    ),
  ),
  'toolbar_loc' => 'top',
  'toolbar_align' => 'left',
  'path_loc' => 'bottom',
  'resizing' => 1,
  'verify_html' => 1,
  'preformatted' => 0,
  'convert_fonts_to_spans' => 1,
  'remove_linebreaks' => 1,
  'apply_source_formatting' => 0,
  'paste_auto_cleanup_on_paste' => 1,
  'block_formats' => 'h2,h3,p,blockquote',
  'css_setting' => 'theme',
  'css_path' => '',
  'css_classes' => '',
)

blackdog’s picture

Category: support » bug
Status: Active » Needs review
FileSize
1.46 KB

Could you try the attached patch?

blackdog’s picture

Even better to remove the old setting also..

blackdog’s picture

Or maybe this one?

vinmassaro’s picture

Thanks for the patch! It's close, but not working. The button is still disabled after update.php runs. Here's the unserialized output (ignore the add'l settings):

array (
  'default' => 1,
  'user_choose' => 0,
  'show_toggle' => 1,
  'theme' => 'advanced',
  'language' => 'en',
  'buttons' => 
  array (
    'default' => 
    array (
      'bold' => 1,
      'italic' => 1,
      'bullist' => 1,
      'numlist' => 1,
      'link' => 1,
      'unlink' => 1,
      'image' => 1,
      'cleanup' => 1,
      'blockquote' => 1,
      'removeformat' => 1,
    ),
    'font' => 
    array (
      'styleselect' => 1,
    ),
    'paste' => 
    array (
      'pasteword' => 1,
    ),
    'imce' => 
    array (
      'imce' => 1,
    ),
    'drupal' => 
    array (
      'nodepicker' => 1,
      'break' => 1,
    ),
    'video_filter' => 
    array (
      'videofilter' => 1,
    ),
  ),
  'toolbar_loc' => 'top',
  'toolbar_align' => 'left',
  'path_loc' => 'bottom',
  'resizing' => 1,
  'verify_html' => 1,
  'preformatted' => 0,
  'convert_fonts_to_spans' => 1,
  'remove_linebreaks' => 1,
  'apply_source_formatting' => 0,
  'paste_auto_cleanup_on_paste' => 1,
  'block_formats' => 'h2,h3,h4,h5,h6',
  'css_setting' => 'none',
  'css_path' => '',
  'css_classes' => '',
)
blackdog’s picture

Status: Needs review » Needs work

Ahh, we have to move inside the array to update the name there too. I'll get to it.

blackdog’s picture

Status: Needs work » Needs review
FileSize
1.57 KB

Try this one. You'll need to reset the schema column in system table for video filter before trying again.

vinmassaro’s picture

This one is a winner. Thanks!

blackdog’s picture

Issue summary: View changes
Status: Needs review » Postponed (maintainer needs more info)

So, this hasn't been committed. Don't know if it's still valid, or needed. Feedback appreciated.

minnur’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

Closing this issue since D6 no longer supported.