TinyMCE toolbar doesn't display

dinkydule - July 1, 2008 - 00:45
Project:TinyMCE
Version:6.x-1.x-dev
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

The tinymce toolbar doesn't display when creating a page, story or book. I'm using Drupal version 6.2 and tinymce version 6.x.1.x. I've installed tinymce (Drupal) under this path:

mysite/sites/all/modules/

and tinymce (Moxiecode) under this path:

mysite/sites/all/modules/tinymce/

I'm pretty sure I've followed all of the instructions in Tizzo's screencast ( https://drupal.org/node/228270 ). I enabled tinymce for administrators and authenticated users, added the profile and configured the editor.

I should mention that the link on the admin/settings/tinymce page to create a new profile generated a 404. The link that was generated was this:

mysite/modules/tinymce//admin/settings/tinymce/add

I eventually figured out it should be this:

mysite/admin/settings/tinymce/add

Does anyone know why the editor doesn't appear, and/or if the incorrect link above might have something to do with it? Did I install it in the wrong directory?

#1

dinkydule - July 1, 2008 - 01:32
Priority:critical» normal
Assigned to:dinkydule» Anonymous

#2

petetspm - July 2, 2008 - 12:01

This might be too obvious but if you have created a TinyMCE profile in Administer / Site Configuration / TimyMCE then make sure
a) that you have allocated the profile and
b) that you have selected what buttons and plugins are enabled within that profile

I noticed that it defaults to no buttons

#3

dinkydule - July 3, 2008 - 19:48

Thanks for replying. I've already done both of those things. I also tried installing the tinyMce autoconfig 6.1 file, but that didn't help either. The source code makes reference to tinyMCE and all of the settings I selected -- it just doesn't display the toolbar.

<script type="text/javascript" src="/misc/jquery.js?h"></script>
<script type="text/javascript" src="/misc/drupal.js?h"></script>
<script type="text/javascript" src="/misc/tabledrag.js?h"></script>
<script type="text/javascript" src="/sites/all/modules/tinymce/tinymce/jscripts/tiny_mce/tiny_mce.js?h"></script>
<script type="text/javascript" src="/misc/jquery.form.js?h"></script>

<script type="text/javascript" src="/misc/ahah.js?h"></script>
<script type="text/javascript" src="/misc/progress.js?h"></script>
<script type="text/javascript" src="/misc/autocomplete.js?h"></script>
<script type="text/javascript" src="/misc/collapse.js?h"></script>
<script type="text/javascript" src="/misc/textarea.js?h"></script>
<script type="text/javascript">jQuery.extend(Drupal.settings, { "basePath": "/", "ahah": { "edit-book-bid": { "url": "/book/js/form", "event": "change", "keypress": null, "wrapper": "edit-book-plid-wrapper", "selector": "#edit-book-bid", "effect": "slide", "method": "replace", "progress": { "type": "throbber" }, "button": false }, "edit-attach": { "url": "/upload/js", "event": "mousedown", "keypress": true, "wrapper": "attach-wrapper", "selector": "#edit-attach", "effect": "none", "method": "replace", "progress": { "type": "bar", "message": "Please wait..." }, "button": { "attach": "Attach" } } }, "tableDrag": { "upload-attachments": { "upload-weight": [ { "target": "upload-weight", "source": "upload-weight", "relationship": "sibling", "action": "order", "hidden": true, "limit": 0 } ] } } });</script>
<script type="text/javascript">if (Drupal.jsEnabled) { $(document).ready(function() { $('#edit-book-pick-book').css('display', 'none'); }); }</script>
<script type="text/javascript">
  function mceToggle(id, linkid) {
    element = document.getElementById(id);
    link = document.getElementById(linkid);
    img_assist = document.getElementById('img_assist-link-'+ id);

    if (tinyMCE.getEditorId(element.id) == null) {
      tinyMCE.addMCEControl(element, element.id);
      element.togg = 'on';
      link.innerHTML = 'disable rich-text';
      link.href = "javascript:mceToggle('" +id+ "', '" +linkid+ "');";
      if (img_assist)
        img_assist.innerHTML = '';
      link.blur();
    }
    else {
      tinyMCE.removeMCEControl(tinyMCE.getEditorId(element.id));
      element.togg = 'off';
      link.innerHTML = 'enable rich-text';
      link.href = "javascript:mceToggle('" +id+ "', '" +linkid+ "');";
      if (img_assist)
        img_assist.innerHTML = img_assist_default_link;
      link.blur();
    }
  }
</script>
<script type="text/javascript">
  tinyMCE.init({
    mode : "exact",
    theme : "advanced",
    relative_urls : false,
    document_base_url : "/",
    language : "en",
    safari_warning : false,
    entity_encoding : "raw",
    verify_html : false,
    preformatted : false,
    convert_fonts_to_spans : false,
    remove_linebreaks : false,
    apply_source_formatting : true,
    theme_advanced_resize_horizontal : false,
    theme_advanced_resizing_use_cookie : false,
    plugins : "advhr,advimage,advlink,contextmenu,emotions,paste,table",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "center",
    theme_advanced_path_location : "bottom",
    theme_advanced_resizing : true,
    theme_advanced_blockformats : "p,address,pre,h2,h3,h4,h5,h6",
    theme_advanced_buttons3 : "strikethrough,cleanup,forecolor,backcolor,sup,sub,advhr,removeformat,emotions,tablecontrols",
    theme_advanced_buttons1 : "bold,italic,underline,separator,pasteword,separator,link,unlink,separator,image,charmap",
    theme_advanced_buttons2 : "fontselect,separator,justifyleft,justifycenter,justifyright,separator,numlist,bullist,indent,outdent",
    extended_valid_elements : "hr[class|width|size|noshade],img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],a[name|href|target|title|onclick]",
    content_css : "/sites/all/themes/pictureperfect/pictureperfect-fluid/style.css",
    elements : "edit-body"
  });

</script>

#4

jweberg - July 4, 2008 - 17:24

I'm having the same problem. Also, thought I would note that I am using the tinymce engine 3.1.0.1.

#5

EyeChartBrew - July 4, 2008 - 18:58

I'm seeing the exact same thing.

In addition, this breaks the Create Content-related JS, as first reported here: http://drupal.org/node/274030

I had lousy luck with getting tinytinymce to work the way I wanted to (it was adding the toolbar to EVERY SINGLE text edit box, and ignoring the Exclusions). And now zero luck with getting the standard tinymce to work at all. Frustrating.
//TB

#6

Max Bell - July 5, 2008 - 05:25

I'm having the same problem. Also, thought I would note that I am using the tinymce engine 3.1.0.1.

Ditto. And note that this is with a vanilla 6.2 sandbox install -- nothing else installed but poormanscron, print and pngfix. Suspect there is something in the 3.1.x tinymce release that is borking the module.

Note: 3.0.5 can be downloaded here.

That said, merely replacing 3.1 with 3.0.5 does not seem to correct the problem, although I have not yet clear my cache.

#7

Max Bell - July 5, 2008 - 05:40

Clearing the cache did it. Shoulda knowed. =D

Further: the compressor and spellchecker add-ons provided from the moxiecode site result in the same issue, which would seem to tip the cause in favor of version incompatibilities.

#8

dinkydule - July 9, 2008 - 21:39

Thank you Max! Installing the tinymce engine 3.0.5 (instead of 3.1.0.1) and clearing the cache fixed it for me too. I found I had to uninstall tinymce completely, then reinstall before I could get this combination working.

#9

kees@qrios - May 2, 2009 - 13:12

Do you guys/gals have Javascript compression enabled? Disabling "Optimize JavaScript files" + empty cache is showing my tinyMCE again.
FF also trows an JS error: Error: tinyMCE.baseURL is undefined
Bronbestand: http://domain.tld/sites/default/files/js/2d486c8bff6210f7d255b9ca2948c11...
Row: 411

#10

morthylla - June 4, 2009 - 16:32

Hello. I use a theme including <?php print $scripts; ?> but I was not able to see the editor or the "enable rich-text editor" link. I discovered that changing the line

drupal_add_js(wysiwyg_get_path('wysiwyg.js'), 'module', 'footer');

to

drupal_add_js(wysiwyg_get_path('wysiwyg.js'), 'module');

fixes the problem. Of course, this is not a real solution, because I don't know yet why this happened. I think this is an issue of my theme, but maybe this help someone.

#11

morthylla - June 4, 2009 - 16:55

Well, I tried another solution. I added

<script type="text/javascript" src="/sites/all/modules/wysiwyg/wysiwyg.js?y"></script>

to my theme. This is a cleaner solution and fixed the issue. I still have to discover why the script wasn't added to $scripts. But I least I know where to fix it.

Cheers

 
 

Drupal is a registered trademark of Dries Buytaert.