ive used the previous tinymce 2.x setup and everything was ok, im using drupal 6, after i upgraded to newer versions as recommended by the update module my setup is now:
img_assist 6.x-2.x-dev
wysiwyg 6.x-0.5
tinymce 3_2_1_1

im using an "editor" profile automatically assigned on login to people with "editor" roles (input/editor profile is selected by default when creating a new node)
the wysiwyg "editor" profile has img_assist button selected, ive tried disabling it, clearing cache, login/relogin, reenabling it again
the "editor" role has img_assist permissions, if i set img_assist to display its own button everything works ok, but i would rather have the wysiwyg button showing up..
"editor" input profile has img_assist enabled

i have also tried wysiwyg 1.x-dev branch and had the same problem

what should i try to make the button show up? if you need any info from me feel free to ask
would also appreciate pointers to code sections where i could try to put place code, just need to know where so i can save up some time..

thank you

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sun’s picture

Status: Active » Postponed (maintainer needs more info)

Did you also update Image Assist 2.x to the latest version?

abaddon’s picture

Image Assist 6.x-2.x-dev (2008-Dec-28)

yes its all green in the updates screen

sun’s picture

> (input/editor profile is selected by default when creating a new node)

Do you have any modules installed that alter input formats?

> would also appreciate pointers to code sections where i could try to put place code

Custom modifications to files are NOT recommended when using Wysiwyg API. See also http://drupal.org/node/358296

AfterSys’s picture

no, only img_assist that ads to the input formats, the profile in questions only has URL filter, HTML corrector and Inline images enabled
i was talking about "Filter Default 6.x-1.x-dev Allows each role to have a default input format for nodes and comments." there
i can add images with img_assist using its own button image (which shows up if i configure it so, and i did right now as a workaround)

for #2, sorry, ive misstyped my thoughts somehow, i meant pointers to where i could place debug code to track why the img_assist button isnt displaying
ill try to dig this up for myself tomorrow

abaddon’s picture

sorry for posting from my other user, i didnt realized it, anyway

heres some debug insight
in wysiwyg.module at line 320
this is where $plugin=='img_assist' as its set from img_assist.module line 1852
in wysiwyg.module it hits the next line on unset($info[$plugin]);
because theres no isset($profile->settings['buttons']['img_assist'])) setting in my $profile array
i do have however a 'drupalimage' member

      ["drupalimage"]=>
      array(1) {
        ["drupalimage"]=>
        int(1)
      }

if i comment out that unset above, the img_assist icon shows up ok in my tinymce..

how did i get a drupalimage instead of a img_assist member? guessing its some old name.. how can i fix it without breaking stuff?

thanks :-)

sun’s picture

Please try to disable the Filter Default module and check whether it works afterwards.

sun’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Sorry, without further information this issue can only be marked as won't fix.

abaddon’s picture

sorry for the late reply, it didnt but i didnt had time to test this more just did a quick workaround

disabling filter default had no effect, it doesnt have an entry in the uninstall tab so i just disabled it from the modules page
also cleared cache, cleared APC, logout/clear browser cache and cookies/login, new username - still no button
i have 2 other sites that exhibit the same issue but i dont really care on those, it was working before the update there too

i have this workaround in place

--- wysiwyg/wysiwyg.module_orig.module  2009-01-17 14:14:21.000000000 +0000
+++ wysiwyg/wysiwyg.module_new.module   2009-02-02 00:32:00.000000000 +0000
@@ -317,7 +317,7 @@ function wysiwyg_add_plugin_settings($pr
     // Only keep enabled plugins in this profile.
     foreach ($info as $plugin => $meta) {
       if (!isset($profile->settings['buttons'][$plugin])) {
-        unset($info[$plugin]);
+//        unset($info[$plugin]);
       }
     }

im still up to date with the latest versions of the modules im using above
i think the key is in #5 post here, i cant figure it out though because i have no idea about the code and no time to dig for now.. but its weird that i seem to be the only one with this issue, probably something related to the local modules im using or some update cycle (maybe missed some update and updated directly to the next one..)

abaddon’s picture

another thing to note
if i enable img_assist on the filtered html wysiwyg profile (tied to the filtered input format), then the button shows up for both filtered and editor profile
if i disable it on the editor profile then it just appears on the filtered profile (my editor wysiwyg prrofile is tied up to the editor input format and editor role, shows up only to users with that role..)
in these cases (img_assist enabled on filtered), switching input formats when editing works ok (button show or hides depending on settings)

if i disable img_assist on the filtered profile back, then it wont show up anymore for both filtered and editor... any idea?

sun’s picture

Title: img_assist button not displaying » External/Drupal plugins not loaded for second associated editor profile
Status: Closed (won't fix) » Active

#9 finally triggered something.

The cause is this code:

function wysiwyg_add_plugin_settings($profile) {
  static $plugins_added = array();
  
  // External plugins must only be loaded once.
  // @todo Actually, each native plugin must not be added twice, but different
  //   profiles can have different plugin-sets for the same editor.  We should
  //   check each plugin for each editor.
  if (isset($plugins_added[$profile->editor])) {
    return;
  }
  $plugins_added[$profile->editor] = TRUE;

You have identified exactly the edge-case that the @todo already states.

sun’s picture

Version: 6.x-0.5 » 6.x-2.x-dev
Status: Active » Needs review
FileSize
5.97 KB
sun’s picture

Component: Editor - TinyMCE » Plugins
TwoD’s picture

I can confirm the patch in #11 is working so far. This is great progress!

spidersilk’s picture

FileSize
4.73 KB

I just tried to apply the patch in #11 (as I'm also having problems with Image Assist no longer showing up in TinyMCE) and got the following:

patching file wysiwyg.module
Hunk #1 succeeded at 313 (offset -15 lines).
Hunk #2 FAILED at 346.
1 out of 2 hunks FAILED -- saving rejects to file wysiwyg.module.rej

The file wysiwyg.module.rej is far too long for me to want to paste it into this message, but I've attached it to this post (with .txt extension added so that the upload form will accept it) if anyone wants to have a look...

sun’s picture

Status: Needs review » Fixed

Thanks for testing, TwoD!

@spidersilk: The patch was probably rejected, because you tried to apply it either to 1.x or an outdated development snapshot of 2.x.

Committed to all branches. New development snapshots will be available within the next 12 hours.

sun’s picture

Note that this patch screwed up pretty much everything. See #390460: Getting JScript Error in latest dev version (4th March) for a quick fix.

Status: Fixed » Closed (fixed)

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

abaddon’s picture

#11 was a fix and #16 is the fix reverted because it screwed up some other things? did i understand this correctly? with the latest versions today im still having the original problem

ive looked through this issue again, with the latest version and referring to wysiwyg/wysiwyg.module, to the best of my understanding the problem is:
- line 115 : this forms api hook steps through the input formats that get displayed on a page
- line 128 : for the first input filter in the form (which is Filtered HTML for me) it calls wysiwyg_add_plugin_settings()
- line 365 : this function will walk through the enabled modules (?) for the current editor (and since i dont have img_assist enabled for Filtered HTML), and disable any modules not enabled for _this_ input filter, even though its not the default and active one

so the fix comes naturally in checking if the input filter passed on to wysiwyg_add_plugin_settings() is also the one selected by default, if its not, then do not disable any plugins that arent in its list, do that just for the default one..

heres the patch, it works ok for me but ill test it more tomorrow (and will write about any issues..) since its almost morning and i need some sleep :-)

--- wysiwyg/wysiwyg.module_orig 2009-03-06 05:22:48.000000000 +0200
+++ wysiwyg/wysiwyg.module_new   2009-05-10 10:54:41.000000000 +0300
@@ -125,7 +125,7 @@ function wysiwyg_process_form(&$form) {
               $theme = wysiwyg_get_editor_themes($profile, (isset($profile->settings['theme']) ? $profile->settings['theme'] : ''));

               // Add plugin settings (first) for this input format.
-              wysiwyg_add_plugin_settings($profile);
+              wysiwyg_add_plugin_settings($profile, $element[$format]['#default_value'] == $element[$format]['#return_value']);
               // Add profile settings for this input format.
               wysiwyg_add_editor_settings($profile, $theme);
             }
@@ -335,7 +335,7 @@ function wysiwyg_add_editor_settings($pr
  *   profiles in use, so we can process plugins in multiple profiles in one shot
  *   and simplify this entire function.
  */
-function wysiwyg_add_plugin_settings($profile) {
+function wysiwyg_add_plugin_settings($profile, $is_default) {
   static $plugins_native = array();
   static $processed_formats = array();

@@ -361,7 +361,7 @@ function wysiwyg_add_plugin_settings($pr
   }
   // Only keep native external plugins that are enabled in this profile.
   foreach ($plugins_native[$editor['name']] as $plugin => $meta) {
-    if (!isset($profile->settings['buttons'][$plugin])) {
+    if ($is_default && !isset($profile->settings['buttons'][$plugin])) {
       unset($plugins_native[$editor['name']][$plugin]);
     }
   }
abaddon’s picture

Status: Closed (fixed) » Active

do i also need to re-open the issue ? if im wrong, please excuse my lack of knowledge on drupal issue handling

sun’s picture

Status: Active » Closed (fixed)

No, the patch from this issue was committed, but we quickly identified that it introduced a new bug, which was fixed in another issue.

Just today, we identified that the plugin processing doesn't work at all for FCKeditor, so the entire function was revamped yet again.

So, please test again with the latest development snapshot that should be available in approx. 12 hours from now (or checkout from CVS HEAD).

If you still encounter a bug with that code, then open a new issue, please.

Thanks for testing (and even trying to provide a patch)!