First of all thanks for this wonderful module, the best I have used so far for dealing with images and wysiwyg editors.

I am trying to set up an image field with Drupal 7.17, Wysiwyg 7.x-2.2, Wysiwyg Fields 7.x-1.x-dev and CKEditor 4.0.0.769.

Although the module seems to work well I get an empty area where the icon should be. I have tried with both a stock icon and a custom one but the result is the same: empty button (working as expected) with no icon. I am not entirely sure, but taking a look at firebug it seems it is not looking in the right place, here's what the button span renders:
<span class="cke_button_icon cke_button__/drupal7/sites/all/modules/wysiwyg_fields/plugins/wysiwyg_fields_field_image/images/d50522754f0bc7cc44d2f5231a467fe8_icon" style=""> </span>

I have also attached some screenshots.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gugalamaciek’s picture

I've got the same problem on IIS7.5 server. I made some tests and for me it works on linux + apache and not no windows server + IIS7.5

For me adding ob_clean() in wysiwyg_fields_wysiwyg_plugin_callback() function solved the problem. It works on apache and IIS7.5 now.

I've attached patch with my changes.

alfazaz’s picture

I have the same problem as castawaybcn... It's really annoying (no icon but the click works).

The #1 patch doesn't work for me.

alfazaz’s picture

I'm looking for a solution to this problem of missing icon and I found that the bad line :

refers to an inexistant image and the d50522754f0bc7cc44d2f5231a467fe8 is the md5sum of the image file of the icon... So, the image name seems to be the md5sum and it's wrong...

In field_ui.inc, we can read

$form_state['values']['instance']['settings']['wysiwyg_fields']['settings']['icon'] = md5_file($uri);

I don't know if it's normal...

alfazaz’s picture

So, I found a very bad hack to solve the problem. I put directly the good icon link in ckeditor.inc, in wysiwyg_ckeditor_proxy_plugin_settings :

$settings[$name] = $plugin['dialog settings'] + array(
'title' => $plugin['title'],
// Bad thing, commented :
// 'icon' => base_path() . $plugin['icon path'] . '/' . $plugin['icon file'],
// The right link to the image icon :
'icon' => base_path() . drupal_get_path('module', 'wysiwyg_fields') . '/images/icons/mail-attachment.png',
'iconTitle' => $plugin['icon title'],
// @todo These should only be set if the plugin defined them.
'css' => base_path() . $plugin['css path'] . '/' . $plugin['css file'],
);

But this module should be reworked for this problem to avoid this bad hack.

silkogelman’s picture

FileSize
20.66 KB

Same issue with the following configuration:
Drupal 7.20
Wysiwyg 7.x-2.x-dev
Wysiwyg Fields 7.x-1.x-dev
CKEditor 4.1.0.80c139aa

wysiwyg fields icon

SuleymanK’s picture

Subscribe.

The #1 patch doesn't work for me.

ryan.gibson’s picture

Same issue here. I'm guessing it's to do with the new CKEditor library.

ryan.gibson’s picture

Well, I can confirm it is fixed by downgrading from CKEditor 4.X

Renee S’s picture

Confirmed that the patch doesn't work for me. Not so keen on downgrading though... ;)

slv_’s picture

Status: Active » Needs review
FileSize
2.44 KB

I'm using ckeditor 4 and have this problem too.

In summary, the issue is on wysiwyg_fields_wysiwyg_fields_plugin(). It doesn't specify the icon path. Just the "icon file", which for ckeditor, the module seems to be appending the md5 hash of the actual image file, instead of loading it from cache and resolving to the proper filename.

Patch attached for version = "7.x-1.x-dev"

Haven't tested with other wysiwyg editors, so don't know if it could be a generic patch for them (if that's the case,it needs polishing a bit), but it certainly works for those of you who only use CKEditor.

If anyone can test with other editors, that'd be great. I'll be happy to re-roll a polished patch if that's the case.

Deciphered’s picture

Let me be clear, until I have time to do some serious work on this module, CKEditor 4 is not at all supported, while you may be able to superficially make it look like it works, it has a lot of underlying changes that don't allow it to work.

joyv’s picture

Issue summary: View changes

Has any progress been made to make the module compatible with CKEditor 4?

Deciphered’s picture

A new branch of work has begun which uses a native CKEditor plugin via the CKEditor module, it's just not ready yet.

Deciphered’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Needs review » Fixed

Fixed in 7.x-2.x

Status: Fixed » Closed (fixed)

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