Closed (duplicate)
Project:
Vertical Tabs
Version:
6.x-1.0-rc1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Apr 2009 at 04:24 UTC
Updated:
5 Apr 2011 at 15:37 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ergophobe commentedComment #2
ergophobe commentedI'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.
Comment #3
atelier commentedRe-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.
Comment #4
atelier commentedAfter further testing, the problem occurs only when logged in as superadmin (user/1). The editor appears and works fine for non-superadmin authenticated users.
Comment #5
TxAvA commentedSame problem
Comment #6
teecee commentedSame 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...
Comment #7
teecee commentedSooo...
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!
Comment #8
gábor hojtsyTranslations of plural stuff should use Drupal.formatPlural(). Hint: figure out where is it trying to use Drupal.t() directly instead of Drupal.formatPlural() first.
Comment #9
teecee commentedGoba, 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
Comment #10
jcmarco commentedThere 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.
Comment #11
teecee commentedI 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?
Comment #12
toomanypets commentedThanks much. I applied patch #10 and WYSIWYG is now working when Vertical Tabs is enabled.
Comment #13
dave reidTested 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.
Comment #14
zhangx1a0 commentedit fails when there is 1 attachment. same error as described above
in my case str is "1 attachment". after processed by codes above, it becomes an object.
Comment #15
zhangx1a0 commentedIt seems to be a bug in drupal.js, I upload my patch here.
I am using Drupal 6.14
Comment #16
e102938 commentedthe same problem with 1 attachment. i attached 0 byte text file (2nd file) and unchecked it's listing. so it did the trick, but...
Comment #17
borfast commentedI am also experiencing this issue with WYSIWYG + FCKEditor.
Comment #18
dave reidCheck your browser's JavaScript console/error log.
Comment #19
borfast commentedI 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?
Comment #20
dave reidRe-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).
Comment #22
delykj commentedI 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)
Comment #23
dave reidNot 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.
Comment #24
delykj commentedFor a quick solution I disabled Vertical Tabs for Uploads.
Comment #25
netmee commentedI 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 ?
Comment #26
borfast commentedI 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".
Comment #27
borfast commentedForgot to update the version...
Comment #28
heltem commented#26 : I confirm.
Same issue here with drupal 6.15 and fckeditor when editing a node with a standard uploaded file.
Comment #29
heltem commentedI think #306715: _locale_rebuild_js doesn't store plural forms correctly is ours.
Comment #30
betz commentedsame here, wysiwyg dissapears when a node has a attachment.
Comment #31
mxa055 commentedI 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.
Comment #32
xbery commentedIt's really strange behaviour because on all of the rest edit forms are VT working as they are supposed to... Must disable them:-(
Comment #33
klonosPlease don't change the issues' titles to meaningless things! It makes it hard for people to locate their issue and that creates duplicates.
Comment #34
juanjo_vlc commentedSame 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.
Comment #35
dave reidIf 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.
Comment #36
heltem commentedI confirm it solved mine.
Comment #37
shushu commentedI 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.
Comment #38
Anonymous (not verified) commentedAppearently 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.
Comment #39
klonos@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)?
Comment #40
Anonymous (not verified) commentedyes 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.
Comment #41
Anonymous (not verified) commentedThe 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.
Comment #42
clemens.tolboom@netmee in #25
I just commented one line
This is a quick fix but I guess due to #504506: Drupal.formatPlural incorrectly handle complex plural rules the most pragmatic way for now.
Comment #43
dave reidThis is a duplicate of #504506: Drupal.formatPlural incorrectly handle complex plural rules which is a core bug.