The way thickbox auto works now it breaks the img_assist dialog box. Instead of selecting an image for insertion, you show the image in a thickbox inside the img_assist popup.
I altered line 44 in thickbox.module ot include && arg(0) != 'img_assist' to avoid that thickbox is loaded in the img_assist popup

Resulting thickbox_menu function:

/**
 * Implementation of hook_menu().
 */
function thickbox_menu($may_cache) {
  if (!$may_cache) {
    if (arg(0) != 'admin' && arg(1) != 'add' && arg(2) != 'edit' && arg(0) != 'img_assist') {
      $path = drupal_get_path('module', 'thickbox');
      drupal_set_html_head(theme_stylesheet_import(base_path() . $path .'/thickbox.css'));
      drupal_add_js($path . '/jquery.js');
      drupal_add_js($path . '/thickbox.js');
      if (variable_get('thickbox_auto', 0) && module_exist('image')) {
        drupal_add_js($path . '/thickbox_auto.js');
      }
    }
  }
}

This hack works for this case, but it does not take into consideration other modules or paths where one might not want the thickbox auto function to act.
Maybe a dialog like the ones used where you asign tinymce or blocks could be used?

Anyway, this hack does at least solve me immediate problem, and might allso help others wanting to use both thickbox and img_assist

-Olegu

Comments

frjo’s picture

Assigned: Unassigned » frjo
Status: Needs review » Fixed

We need a better solution for this but meanwhile I have committed your fix for the img_assist dialog box.

Anonymous’s picture

Status: Fixed » Closed (fixed)