Hello,
I'm working with CKEditor 6.x-1.3 with extrapluging mediaembed without problem, for that I've add mediaebeded directory into plugings on CKEditor and also I've modified ckeditor.config.js by uncomment 2 lines below:

config.extraPlugins += (config.extraPlugins ? ',mediaembed' : 'mediaembed' );
CKEDITOR.plugins.addExternal('mediaembed', Drupal.settings.ckeditor.module_path + '/plugins/mediaembed/');

and also I have added 'MediaEmbed' in "Drupal.settings.cke_toolbar_DrupalFull"
With this actions CKEditor 6.x-1.3 works fine,

My problem is when I update to CKEditor 6.x-1.11 I can not make the mediaembed appear in the tool bar.
I don't know how to modify ckeditor.config.js in order to have the same performance as CKEditor 6.x-1.3.
(ckeditor.config.js from CKEditor 6.x-1.11 doesn't have the two lines I've uncommented on CKEditor 6.x-1.3)

I think the problem is on the modification of ckeditor.config.js but I don't know how to do that.

Thank you

Comments

dczepierga’s picture

Status: Active » Closed (works as designed)

Hi,
With new version of CKEditor module u must only go to CKEditor profile (which u use) and there in "Editor apperance" section drag "Embed media" button to toolbar and in plugins u must enable "Plugin for inserting Drupal embeded media". After this button should appear in your toolbar.

If it doesn't help pls reopen this issue (change status to active).

Greetings

jrstmartin’s picture

Status: Closed (works as designed) » Active

I'm having a similar problem too, so reopening as you advised. I've just updated from 6.x-1.3 to 6.x-1.11. CKEditor 3.5.3 is installed. MediaEmbed button does not appear in the toolbar initially. If I toggle the state (switch to plain/rich text editor), the button then appears. But again, it does not appear initially, so is broken.

With new version of CKEditor module u must only go to CKEditor profile (which u use) and there in "Editor apperance" section drag "Embed media" button to toolbar and in plugins u must enable "Plugin for inserting Drupal embeded media". After this button should appear in your toolbar.

Yes MediaEmbed button is in my toolbar and "Plugin for inserting Drupal embeded media" is checked. I cleared Drupal all caches and browser caches, RTFM, and no go. Here is a video to make it clear:

http://www.youtube.com/v/xUFeRpzjNmg&hd=1&autoplay=1

Old ckeditor.config.js used to have this:

// 'MediaEmbed' plugin. To enable it, uncomment lines below and add 'MediaEmbed' button to selected toolbars.
config.extraPlugins += (config.extraPlugins ? ',mediaembed' : 'mediaembed' );
CKEDITOR.plugins.addExternal('mediaembed', Drupal.settings.ckeditor.module_path + '/plugins/mediaembed/');

But I noticed the new ckeditor.config.js does not, so I didn't add any code there, just checked the box and used the button as I mentioned above.

Please help. Thank you.

dczepierga’s picture

Status: Active » Postponed (maintainer needs more info)

Could u check does u have any errors in Firebug (Firefox addon)? Do u see there any 404 in NET tab?

Greetings

jrstmartin’s picture

Status: Postponed (maintainer needs more info) » Active

I've gone as far as I can on this issue. I don't know PHP, so I'm not smart enough to figure this out. I'll I know is this:

  1. The following HTML (for the MediaEmbed icon & link) fails to get printed on CKEditor initialization. It only gets printed on the 2nd CKEditor load, after toggling CKEditor visibility off/on:
  2. <span class="cke_button"><a onclick="CKEDITOR.tools.callFunction(17, this); return false;" onfocus="return CKEDITOR.tools.callFunction(1, 11, event);" onkeydown="return CKEDITOR.tools.callFunction(0, 11, event);" onblur="this.style.cssText = this.style.cssText;" aria-labelledby="cke_53_label" role="button" hidefocus="true" tabindex="-1" title="Embed Media" class="cke_off cke_button_MediaEmbed" id="cke_53"><span style="background-image:url(/sites/all/modules/ckeditor/plugins/mediaembed/images/icon.png?t=B37D54V);background-position:0 0px;" class="cke_icon">&nbsp;</span><span class="cke_label" id="cke_53_label">Embed Media</span></a></span>

  3. There are no errors in the Firebug Console.
  4. There are no 404 errors in Firebug Net. Everything is 200.
  5. Disabling performance settings makes no diff (JS/CSS aggregation).
  6. I performed the painstaking process of rolling back the module until the issue was fixed. Fixed, meaning, the MediaEmbed icon was visible upon the 1st initialization of CKEditor on a text area. The problem started in 6.x-1.4. In that version, the MediaEmbed icon is not visible upon CKEditor initialization.
  7. With my limited knowledge, all I can guess is that it has something to do with these commits:
dczepierga’s picture

@jrstmartin, could u write me one more thing: U have your webserver on Windows or Linux?

Greetings and really thx for help to find this bug

jrstmartin’s picture

Ubuntu 10.04.4 LTS
Linux ubuntu 2.6.32-41-generic
Apache/2.2.14 (Ubuntu)
MySQL 5.1.63
PHP Version 5.2.10-2ubuntu6.9

I'm willing to help in any way I can. I'm just out of ideas. Let me know if you need anything. I can do any testing that you need. Thanks.

dczepierga’s picture

Status: Active » Postponed (maintainer needs more info)

I've try to reproduce this on Ubuntu, and for me everything works without problem. I try to install 6.x-1.3, 6.x-1.11, 6.x-dev and update 6.x-1.3 to 6.x-1.11, and nothing change - everything works for me...

Try to check ckeditor.config.js file, do u have any additional configuration options there? Do u have following section?

// 'MediaEmbed' plugin. To enable it, uncomment lines below and add 'MediaEmbed' button to selected toolbars.
config.extraPlugins += (config.extraPlugins ? ',mediaembed' : 'mediaembed' );
CKEDITOR.plugins.addExternal('mediaembed', Drupal.settings.ckeditor.module_path + '/plugins/mediaembed/');

Do u run update.php script from your Drupal after module update?

Greetings

jrstmartin’s picture

Well, after this being such a big issue, it turned-out that if I created a new CKEditor profile at /admin/settings/ckeditor, then there wasn't a problem with that new profile. The MediaEmbed plugin icon would display upon the 1st CKEditor load. Yay! :)

If anyone else runs into strange issues like this when upgrading beyond 6.x-1.3, try deleting your CKEditor profiles and recreating them. It's a real pain in the ass (I will have to recreate 16 of these on various sites!) but it's the only clear way to fix it.

Also related: The new "toolbar customizer" under Editor Appearance will not work (will not display1) in profiles created using 6.x-1.3. You could resort to disabling the toolbar customizer and entering the toolbar configuration manually, but that is how I ended-up with my strange MediaEmbed-plugin-icon-not-appearing issue. Create a new profile and you'll see that the customizer is working.

1 Error returned in Firebug console from the Drupal.ckeditorToolbarUsedRender = function():

ReferenceError: YOUR-6.x-1.3-PROFILE-NAME is not defined
toolbar = eval(toolbar);