Title pretty much says it. I have a textarea that has a TinyMCE (running under WYSIWYG 6.x-2.x-dev). It's fine, until I enable Vertical Tabs, then the editor disappears.

Any ideas?

Comments

ergophobe’s picture

Issue tags: -vertical tabs
ergophobe’s picture

Status: Active » Closed (fixed)

I'm not so sure about this. I went back and looked at it in Firefox again and it worked. Then I reloaded the page and it didn't work. If I go to another page and come back to the edit page, I get the WYSIWYG editor. If I just reload the page, I get a plain text area.

So I tried running the same test with VT turned off. As it turns out, this seems to be the problem, rather than turning VT on and off. So this bug report is bogus.

atelier’s picture

Status: Closed (fixed) » Active

Re-opening because I'm experiencing this exact problem in both IE7 and FF3 using Wysiwyig API and TinyMCE editor. The editor works fine in all other areas of the site, but disappears completely when VT is activated. Any insight would be very much appreciated.

atelier’s picture

After further testing, the problem occurs only when logged in as superadmin (user/1). The editor appears and works fine for non-superadmin authenticated users.

TxAvA’s picture

Same problem

teecee’s picture

Same problem here :-\
Drupal 6.14 with Vertical Tabs 6.x-1.0-beta5 and Wysiwyg 6.x-2.0 with all the editors installed and NicEditor used.
Please not that I changed jQuery to 1.3.2, but I'm usingDrupal in multisite and using Vertical tabs elsewhere and only this comes out buggy.
So when adding a new content (self made news content type) with user-1 it works perfectly, but with another admin groupped user it says:
str.replace is not a function
http://www.euromenedzser.hu/misc/drupal.js?r
Line 101

Where there is the line: str = str.replace(key, args[key]);

The header of the file is:
// $Id: drupal.js,v 1.41.2.4 2009/07/21 08:59:10 goba Exp $

I'm using a self made theme maybe that can have something with it.
If I have more time I'll try to track the bug down, for now I'm just disabling Vertical Tabs until the bugging...

teecee’s picture

Sooo...
I tracked down a bit, it'll be translation syntax error or buggy handling of plural form.

drupal.js fails on line 101 if the str variable become an array: ["1 csatolmány", "@count csatolmány"]
So an object of course does not have a string's replace() function.

It is sure that this is the problem, if I deleted the translated plural forms in my language than it gives no error.

Enyone a bit more familiar with this? Thanks!

gábor hojtsy’s picture

Translations of plural stuff should use Drupal.formatPlural(). Hint: figure out where is it trying to use Drupal.t() directly instead of Drupal.formatPlural() first.

teecee’s picture

Goba, thanks for looking at this problem.

I found that vertical_tabs uses Drupal.formatPlural() in the module's vertical_tabs.node_form.js on line 74, and Drupal.formatPlural() calls Drupal.t() and so comes the str.replace() bug. :-\
I was playing with firebug's watchpoints for a while... :D

jcmarco’s picture

Status: Active » Needs review
StatusFileSize
new1.18 KB

There is an error in the js, the attribute "checked" should be true or false.
With this patch, the wysiwyg editor and any other js run after the added Drupal.behaviors.verticalTabsSettings start working again.

teecee’s picture

I just realized that I wrote my problem to a dev version issue queue, but I have the beta5 installed. Sorry, my mistake!
(I was unable to find any 'checked' string in my vertical_tabs.js file)

Should I open a new issue to my problem?

toomanypets’s picture

Thanks much. I applied patch #10 and WYSIWYG is now working when Vertical Tabs is enabled.

dave reid’s picture

Status: Needs review » Fixed

Tested wtih the most recent code with BUEditor and WYSIWYG + TinyMCE and it works just fine. Please re-open if that's not the case with the latest code.

zhangx1a0’s picture

it fails when there is 1 attachment. same error as described above

/* misc/drupal.js: line 81 */
if (Drupal.locale.strings && Drupal.locale.strings[str]) {
  str = Drupal.locale.strings[str];
}

in my case str is "1 attachment". after processed by codes above, it becomes an object.

zhangx1a0’s picture

StatusFileSize
new1.01 KB

It seems to be a bug in drupal.js, I upload my patch here.

I am using Drupal 6.14

e102938’s picture

Issue tags: -wysiwyg +attachments

the same problem with 1 attachment. i attached 0 byte text file (2nd file) and unchecked it's listing. so it did the trick, but...

borfast’s picture

Status: Fixed » Active

I am also experiencing this issue with WYSIWYG + FCKEditor.

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

Check your browser's JavaScript console/error log.

borfast’s picture

I just re-enabled vertical tabs and apparently the problem is gone but since I changed a few other things on the site, I can't be sure if there was something else causing the problem. Can someone else confirm this, please?

dave reid’s picture

Status: Postponed (maintainer needs more info) » Fixed

Re-open if re-confirmed (and checked in your browser's JavaScript console log that it wasn't a JavaScript error not related to vertical tabs).

Status: Fixed » Closed (fixed)

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

delykj’s picture

Version: 6.x-1.x-dev » 6.x-1.0-rc1
Status: Closed (fixed) » Active

I get the same Javascript error with 6.x-1.0-rc1. I'm using the stable CKEditor.

Call stack:
str.replace is not a function
t(["1 csatolmány", "@count csatolmány" 0=1 csatolmány 1=@count csatolmány], { @count=1 })drupal.js?6 (line 101)
formatPlural(1, "1 attachment", "@count attachments", { @count=1 })drupal.js?6 (line 145)
attachments()upload.js?6 (line 8)
(?)("attachments", { name=Csatolmányok weight=-2 callback=attachments })vertical...tabs.js?6 (line 13)
init({ attachments=Object media_mover=Object }, function(), { name=F })jquery.min.js?6 (line 12)
verticalTabs()vertical...tabs.js?6 (line 10)
(?)()drupal.js?6 (line 42)
init({ }, function(), { name=F })jquery.min.js?6 (line 12)
attachBehaviors(Document edit)

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

Not sure what to say to that. It sounds more like a core Drupal JavaScript problem with Drupal.t or Drupal.formatPlural. I tried using those strings and couldn't duplicate the error.

delykj’s picture

For a quick solution I disabled Vertical Tabs for Uploads.

netmee’s picture

Version: 6.x-1.0-rc1 » 6.x-1.x-dev
Issue tags: +tinymce wysiwyg

I couldn't see TyniMCE with Wysiwyg module if 1 attachement is in my page (it's ok with 2 attachements).
It seems to be the same problem as #701398: The attachments fieldgroup causes fckeditor to not work and #533720: Incompatability with file uploads ...

How to disabled vertical Tabs for Uploads in Drupal 6.X ?

borfast’s picture

I just noticed something: my WYSIWYG editor still works with the latest vertical tabs (which I downloaded and re-enabled) but vertical tabs stops working when the node being edited has an attached file (no CCK field, just plain old Drupal upload module).

To be more specific, vertical tabs no longer show and instead, I get the collapsible fieldsets back but they are not collapsible/expansible anymore, which means the node editing form gets 90% unusable.

Also, with vertical tabs turned on, the Menu fieldset disappears from where it usually is, nowhere to be found in the form.

Firebug says there's a problem on drupal.js, line 101:
str = str.replace(key, args[key]);
It says that "str.replace is not a function".

borfast’s picture

Version: 6.x-1.x-dev » 6.x-1.0-rc1

Forgot to update the version...

heltem’s picture

#26 : I confirm.

Same issue here with drupal 6.15 and fckeditor when editing a node with a standard uploaded file.

heltem’s picture

betz’s picture

same here, wysiwyg dissapears when a node has a attachment.

mxa055’s picture

I have the same problem. When displaying a page in English vertical tabs and FCKEditor appear just fine. When switching to local language fckeditor dissappears and so do vtabs.

xbery’s picture

Title: WYSIWYG Editor disappears on fields within Vertical Tabs » Same here

It's really strange behaviour because on all of the rest edit forms are VT working as they are supposed to... Must disable them:-(

klonos’s picture

Title: Same here » WYSIWYG Editor disappears on fields within Vertical Tabs

Please don't change the issues' titles to meaningless things! It makes it hard for people to locate their issue and that creates duplicates.

juanjo_vlc’s picture

Same problem as #26 using vertical_tabs 6.x-1.0-rc1 and latest wysiwyg and ckeditor as library.

My wysiwyg editor, and any tab which has been turned to "vertical tab" gone away.

dave reid’s picture

If anyone is using translations on their site, please check to see if #306715: _locale_rebuild_js doesn't store plural forms correctly solves this first.

heltem’s picture

I confirm it solved mine.

shushu’s picture

I had similar "crazy" behavior, with no javascript error messages (which even made it worse to figure out the problem).

It took a while to pinpoint the problem, but in few words I can say:
- vertical tabs works properly.
- In some cases (couldn't figure out yet when) the configuration of "Vertical tabs default tab" (the vt_default module) of a content type does not work properly (hence it seems that vertical tabs doesn't work...). Try not to edit the content type too often.
- Using FormFilter module is an amazing tool, since it makes it easy to create a user-friendly node creation. The problem is - it doesn't work well with Wysiwyg module (I guess that the wysiwyg tried to hide the "input filters" section before showing the ckeditor I tried to use, but since it was hidden by FormFilter, it thought it has nothing to do...).
- Wysiwyg and playing with input filters for the first time means I guess I mixed few things before I was able to do it right. I always thought I have permissions problems by mistake...

Hope this help few people in the future.

Anonymous’s picture

Appearently it is not a vertical tabs problem but a core problem.
There is a patch on http://drupal.org/node/504506#comment-3414882 that works. I really hope this will be commited soon. I love the VT module but since this js problem it is useless for us.

Maybe adding some comments on issue http://drupal.org/node/504506 will push it to be committed sooner.

klonos’s picture

@JoepH: are you saying that the patch in post #45 in #504506: Drupal.formatPlural incorrectly handle complex plural rules also solves this issue here? If so, did you test it with latest D6 and latest dev of VT? You also say that it seems to be a core bug (or this issue is a side-effect of it at least). Did you test it against D7 too (with core vertical tabs I mean)?

Anonymous’s picture

yes it solves the issue here.
I have tested this on D6.19 and VT 6.x-1.x-dev (2010-jul-18) and I can confirm it works.

Anonymous’s picture

The problem that the wysiwyg editor disappears is because there is a javascript error caused by the issue described on http://drupal.org/node/504506. The other javascript will never be called because of the previous error.

clemens.tolboom’s picture

@netmee in #25

I just commented one line


Index: vertical_tabs/vertical_tabs.module
===================================================================
--- vertical_tabs/vertical_tabs.module	(revision 646)
+++ vertical_tabs/vertical_tabs.module	(working copy)
@@ -83,7 +83,7 @@
     $fieldsets['book'] = 'book';
     $fieldsets['menu'] = 'menu';
     $fieldsets['comment_settings'] = 'comment';
-    $fieldsets['attachments'] = 'upload';
+//    $fieldsets['attachments'] = 'upload';    // THIS LINE disables the translation of the number of uploads and thus the failure.
     $fieldsets['path'] = 'path';
     $fieldsets['taxonomy'] = 'taxonomy';
     $group = 'additional_settings';

This is a quick fix but I guess due to #504506: Drupal.formatPlural incorrectly handle complex plural rules the most pragmatic way for now.

dave reid’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)