2

I installed latest version of the WYSIWYG module (dev version) and also the latest CKEditor library. This module can find the library, I selected the ckeditor for text format "Full html" only.

But when I try to edit the content it does not show up. All modules are update to date. I have other Drupal sites and this module works with no problem.

What to do?

Notes:

  1. The text is there when you start an edit session of the node. But it is just full html text, with all the HTML code being shown, as in this example:

    enter image description here

  2. I also tried by enable of an additional editor, as shown here:

    enter image description here

    But still nothing happens.

  3. The link to enable/disable the editor is missing (and it should be there). I spotted that problem at first. I wanted it to be disabled by default and then by clicking on it it should be enabled. but the link is not there. Here are the scripts errors:

    enter image description here

    I cannot see something.

1
  • Comments have been deleted. Please don't use them for extended discussion.
    – avpaderno
    Commented Apr 15, 2016 at 17:22

4 Answers 4

1

In the CKEditor page you have to select Enable in CKEditor -> EDITOR APPEARANCE -> "Default editor state".

This you can find in admin/config/content/ckeditor/edit/<yourtextformat>

enter image description here

Or if you dont want to enable that by default, then you can click manually "Switch to to rich text editor" in /node/<nid>/edit

enter image description here

1
  • this link is not even there, switch to text editor.....and i enabled it by default too...that is the scary thing....switch to rich text editor is not there.....
    – hentaigrl
    Commented Apr 13, 2016 at 18:20
1

To use CKEditor version 4.x with the WYSIWYG module, you do in fact need to use the dev version of the WYSIWYG module: https://www.drupal.org/node/588512

I would advise deleting the WYSIWYG folder and dropping in this dev version, and running any applicable updates on update.php (but I do not suspect there will be any).

On Drupal 7 this is required for CKEditor 4 to load.

Regarding the very first script error "Cannot read property 'msie' of undefined" that is certainly a jQuery related error. What version are you running? You should get the jQuery Update module (my rule of thumb with that is 1.10+ on the front end, and 1.7 for all admin pages). The module will let you add that configuration in the admin UI.

I used to get stuck here quite a bit but it is usually one of the above two things.

Are you trying to use any custom plugins for CKEditor? If a plugin is missing common properties (in its plugin.js) it can throw JS errors which will certainly prevent the editor from loading.

As a final note, the reason you do not see the 'enable/disable rich editor' link is that the code that determines this lives in the WYSIWYG module. If the editor isn't loading, it will not show:

// Add basic Wysiwyg settings if any editor has been added.
  if (!isset($settings_added) && $loaded[$name]) {
    drupal_add_js(array('wysiwyg' => array(
      'configs' => array(),
      'plugins' => array(),
      'disable' => t('Disable rich-text'),
      'enable' => t('Enable rich-text'),
    )), 'setting');

So that is why you don't see it. Please check on your version of jQuery and WYSIWYG module and report back. I am fairly confident this is your issue. Also, if you could change your admin theme to Seven (looks custom / Bootstrap from youc pics) that could help narrow down what is using unsupported JS.

2
  • How does your first paragraph differ from the first phrase in the question, i.e: "I installed latest version of the WYSIWYG module (dev version) and also the latest CKEditor library."? And what would be the difference of "deleting the WYSIWYG folder and dropping in this dev version" as compared to how it is phrased in the question already? Commented Apr 15, 2016 at 15:31
  • Sounds like in his comments after the fact, he swapped back to the stable release which is 4 years old now. Blowing the directory away and dropping in the dev version ensures there is no left over files or code that should not be there. CKEditor version 4 simply does not work in the stable WYSIWYG release from 2012.
    – Kevin
    Commented Apr 15, 2016 at 15:35
0

Here are some hints to help you debugging (= taking away all possible causes, 1 at a time):

  • A possible explanation for what you're experiencing, is that it is a memory problem (not enough memory available. So try to (temporary) increase your memory limit (say with like 25% or so). To do so, check my answer at Why can I not find the og table after installing Organic Groups? (the settings.php part of it). You're looking for a line like ini_set('memory_limit', '128M');, if it is not there yet, just insert such line at the very end. And (temporary) try with 256M instead of 128M.
  • As an alternative to increasing memory: try to (temporary) disable some other module(s) which might free up just enough memory without having to edit settings.php).
  • Verify if you get the same issue with user/1. If so then you eliminate it is a permission issue (since with user/1 you skip/ignore any type of permission).
  • Try to recreate the same issue using another browser (if that works it might be like a cookie problem).
  • If none of the above helps, try to change the CKEditor library version, to see if that would help. Like if you now have 4.x, (temporary) replace it by some 3.6.x version and try again.

More attempts to try to figure out the real problem:

  • You are using the DEV version of Wysiwyg, try with the latest official release. Know that that official release does not recognize the 4.x lib yet, but it does recognize that 3.6 lib.

  • Why are you using the Wysiwyg module at all, and why not just the CKEditor module (with the same CKEditor library)? If you can't figure out the real cause of your issue, then just not using Wysiwyg might be a possible alternative (instead of trying to solve the problem, try to avoid the problem).

  • Adding that other editor (for filtered html) is only going to complicate things (possibly create side effects). So I would remove that again. From what I read in your comments (or question), nowhere I see an indication that you tried with that 3.6.x version of the CKEditor library (instead of the 4.x I see in your last screenprint). Try that also. FYI: I always use official releases of Wysiwyg (and still with the old 3.6.x CKEditor library). I never ran into issues like yours here.

Updates:

  • Your screenprint with the Script error: THAT seems to be an interesting NEW path for debugging, though I don't know how to further debug that (at least not for now). Could it be a jQuery problem? Could be related to (caused by) JQuery Update, similar to what is described in "Cannot edit my views.. I get a JSON string?".

  • Replace the Wysiwyg module by the CKEditor module as I suggested before, at least temporary to see if that helps.

1
  • Just so everybody can get the solution, a friend of mine solved it. It was in fact jquery, so I had to go into jquery admin/config/development/jquery_update and click third option jquery update and enable jquery migrate plugin....after i checked the box, no mor problem.......person who solved this is always on drupal chat irc, name is BrandonC he is a genious, even the devs of jquery were clueless the dev of wysiwyg almost reported me for asking the question etc.......
    – hentaigrl
    Commented Apr 15, 2016 at 20:12
0

Just so everybody can get the solution, a friend of mine solved it. It was in fact jquery, so I had to go into jquery admin/config/development/jquery_update and click third option jquery update and enable jquery migrate plugin....after i checked the box, no mor problem

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.