I had a node created with firefox that I wanted to update using Safari. When opening the node in edit mode in Safari, the ckeditor toolbar was not visible. I only had the textarea with the "switch to plain text editor" link below. The link was not working either. Using the code inspector of Safari, I found out that there was a javascript error in the file /ckeditor/include/ckeditor.utils.js at the line 44:

var tv = teaser.textarea.val();
    if (tv.length > 0) {
      $("#" + textarea_id).val(tv + '\n<!--break-->\n' + $("#" + textarea_id).val());

The variable tv in my case was undefined. I have just added a validation in the if section to make it work again in Safari:

var tv = teaser.textarea.val();
    if (tv && tv.length > 0) {
      $("#" + textarea_id).val(tv + '\n<!--break-->\n' + $("#" + textarea_id).val());

Comments

carolalind’s picture

Thank You so much!!! This solution solved my problem with ckeditor which I've been struggeling with for a long time now. My errors kept showing up in ie8 but worked fine in firefox, so it seems this problem shows up randomly in different browsers on different computers. Very strange...

jteague’s picture

Title: The toolbar does not show on Safari if the teaser of the node is empty » The CKEditor fails to load sporadically if the teaser of the node is empty

I can confirm that this bug occurs sporadically across several browsers, including Firefox 3, Safari, and IE8. hinanui's fix resolves the issue. Recommend the patch. I updated the title of this report to clarify that the bug is not Safari-centric.

wwalc’s picture

Status: Active » Reviewed & tested by the community
mephir’s picture

Status: Reviewed & tested by the community » Fixed

Chnages commited to CVS.

Status: Fixed » Closed (fixed)

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