Not sure if this should be Support or Bug Report. Something has caused the editor to disappear.

I was running the dev version 1.149.2.18 2009/11/17 because it had CK Editor support. I upgraded the following modules to the most recent version:

  • context
  • emfield
  • search 404
  • menu block
  • pathauto
  • insert.

I installed the following two modules:

  • views slideshow
  • login destination.

Then I tried patching WYSIWYG with the patch in #31 in #510552: Invalid XHTML: missing trailing slashes, absolute urls and uppercase tags, to solve the teaser break issue. When I tried to edit a page, then entire editor area is blank - no text field, no buttons, just a big white space. Sometimes, I see a brief flash of the text (I believe in raw HTML) before it disappears.

I of course assumed the problem was because I had patched break.js with a patch intended for a different version, and then realized that I could upgrade to 6.x-2.1 stable as that would have CK Editor support. So I deleted the dev version folder and installed 2.1. However, the problem persisted. I realized I wasn't sure when the last time was I had tried to edit content, so I don't know when the problem occurred.

To troubleshoot, I have tried the following:

  • disabling and re-enabling WYSIWYG
  • disabling all modules recently upgraded or installed
  • testing in Minelli to make sure the problem wasn't caused by my theme
  • testing in IE8 to make sure the problem wasn't Firefox 3.6-specific
  • changing the input filter
  • changing the language for the input filter (per the FAQ)
  • upgrading CK Editor to the most recent version

Any suggestions about additional steps I can take to troubleshoot & solve? Thanks.

-Kelley

CommentFileSizeAuthor
#11 wysiwyg-DRUPAL-6--2.block-formats.11.patch1.52 KBsun
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TwoD’s picture

Status: Active » Postponed (maintainer needs more info)

Thanks for reporting what you've already tested, makes it easier to narrow down the list of possible problems.
I'd recommend installing the Firebug extension for FF if you don't already have it.
Are you seeing any JavaScript errors on the page when trying to load the editor?
If you clear the cache, open Firebug's Net tab and reload the page, are any of the files listed as red? (Missing/access denied.)
The big white space you're seeing might actually be the editor, but with missing styles. The raw HTML you see is the original textarea before Wysiwyg's code has kicked in and told the editor to hide it and show the editor instead. Could you inspect the HTML using Firebug and see if an element just next to the original textarea is an iframe? If so, the actual editor has begun loading, but fails at a point where the process is out of Wysiwyg's control.

sun’s picture

Is JavaScript aggregation enabled?

BrightBold’s picture

Status: Postponed (maintainer needs more info) » Active

Thanks both of you for your help.

@sun - JavaScript aggregation is not enabled.

@TwoD - You're correct that the content does exist in the source, but I don't see any iframes anywhere. The Net tab doesn't report any missing files. However, I am getting a CKeditor error that I hadn't noticed:

L is undefined
else Q.focus();return false;}return tr...(!M&&!L.hasAttributes())return true;

ckeditor.js line 94

So I swapped out CKeditor for TinyMCE and voila! The editor has reappeared. So something is conflicting with CKeditor, but the problem started before I upgraded to the latest version, so something else caused it. I'd love to figure out what that is so I can go back to CK.

Any suggestions for what I should do next? I appreciated your previous troubleshooting advice - I have a lot more experience using Firebug to troubleshoot CSS than JavaScript, so the tips were useful.

TwoD’s picture

Tried completely removing and re-upploading the CKEditor files? Probably isn't as simple as that though since there were no missing or obviously corrupted files.

Thanks for the error description. It's from the compressed/combined script file, but there's only one place in the entire CKEditor source tree where the same pattern appears: ckeditor/_source/plugins/styles/plugin.js:

 188                                 // If no attributes are defined in the element.
 189                                 if ( !fullMatch && !element.hasAttributes() )
 190                                         return true;

I'm not able to figure out much other than something tried to run the checkElementRemovable() method - from which this snippet is taken - and seems to pass an object which at first glance looks ok (it is not null, and has the getName() method - or the script would have crashed earlier). But then the object suddenly ceases to exist when an attempt is made to run its hasAttributes() method.

If you try CKEditor again and get the same error, try disabling the font/style related buttons/extensions and see if that resolves it.

BrightBold’s picture

Great - thanks. I don't know if I will have time to mess with this again until after DrupalCon, but as soon as I do I will try both those suggestions and see what happens, and let you know how it turns out.

BrightBold’s picture

Well, neither of those tips solved the problem, but they did set me down the right road to the solution, thanks!

And the problem was (drumroll please...) an errant space after one comma in the comma-separated list of accepted HTML block formats in the CSS section. Removed the space, and the editor reappears. Ta da!

So if it's easy enough to do, maybe a little code to strip spaces from that field would be helpful?

BrightBold’s picture

Update: this appears to be an issue that got introduced in the last few months. I just updated another (production) site to 6.x-2.1 that had been running, I believe, a dev version from November (again, to get the CKEditor support.) Once the upgrade was complete, the editor had disappeared. (Damn you, browser auto-complete! I had used exactly the same string, with the space in the same spot, as on the other site.)

I had previously assumed that the problem occurred when I changed the HTML block formats field string and accidentally added the space, but this shows that having a space in the string previously didn't cause a problem. So either it's something that got introduced in Wysiwyg in recent months, or a conflict with another module. Modules that got upgraded on both sites are: menu block, pathauto, insert, views slideshow. And even though it's not on the list in my original comment, I do notice that both sites are running Better Formats, which I just upgraded on the second site and seems like something that might actually interact with Wysiwyg, (unlike, say, views slideshow.)

You may not actually need this information now that we've identified the problem, but in case it's helpful there it is.

TwoD’s picture

Thanks for the detailed information!

Better Formats doesn't interact with Wysiwyg directly, as it just limits which input formats are available where, and Wysiwyg will then attach editor profiles to those which end up available.

Wysiwyg 6.20 didn't have CKEditor support, so yes, this would have been introduced with 2.1. The editor probably crashes because it can't parse the list of HTML Block formats sent to it when there's a space in it. Haven't looked into it yet, but maybe we could make it more white-space tolerant?

BrightBold’s picture

Title: Editing area disappeared » Blank space in HTML Block Formats field causes editing area to disappear

Wysiwyg 6.20 didn't have CKEditor support, so yes, this would have been introduced with 2.1.

True but before I was having the problem I was using an intermediate dev version that did have CKEditor support. So the intolerance for the blank space appeared somewhere between dev version 1.149.2.18 2009/11/17 and 6.x-2.1. Although that may not be particularly useful information now that we know what was causing the problem, and how to avoid it.

Thanks for your troubleshooting help, and all the work on this great module!

TwoD’s picture

Priority: Normal » Minor

I haven't looked closer at this yet, but it may have been introduced with this change: http://drupalcode.org/viewvc/drupal/contributions/modules/wysiwyg/editor...

Dropping this to minor as the feature itself works. It's just a bit too strict when it comes to input formatting.

sun’s picture

Component: Editor - CKeditor » Code
Status: Active » Fixed
FileSize
1.52 KB

Thanks for reporting, reviewing, and testing! Committed attached patch to all branches.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Status: Fixed » Closed (fixed)

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