When I create a new node, all the usual tabs are there (from core and contrib, e.g. metatags, xmlsitemap, authoring information) and everything works as expected. Now when I edit an existing node, only some of these items are shown (Input format, Attachments, and an attached filefield...). But Authoring Information, Publication Options and some of the other tabs are no longer there. Now saving the node sets the previously saved author, publication date, published and promoted to frontpage settings to empty (unpublished, not promoted to frontpage, no author and date).

Perhaps other factors than vertical_tabs module are involved, but this is the only thing I can think of now, because after disabling the module, everything started working again. I'm using Garland as Admin theme, so that shouldn't be the problem, right? Or could this be caused by one of the tabs provided by contrib (xmlsitemap, metatags, an imagefield I added to the content type...?

Comments

dave reid’s picture

Category: bug » support
Status: Active » Postponed (maintainer needs more info)

1. With core only + vertical tabs it works just fine, so yes its likely something else messing up.
2. Garland should work just fine.
3. Check for JavaScript errors in your browser's JavaScript console.
4. Try disabling the other modules temporarily and leaving vertical tabs enabled to find which one is the problem.

ar-jan’s picture

Yes, there seems to be one javascript error located in "http://mysite.com/misc/drupal.js?a", line 101 (what's the last "a" for?): "str.replace is not a function"

So it seems to be theme- or i18n related. Line 101 reads str = str.replace(key, args[key]);, here's the whole code block:

Drupal.t = function(str, args) {
  // Fetch the localized version of the string.
  if (Drupal.locale.strings && Drupal.locale.strings[str]) {
    str = Drupal.locale.strings[str];
  }

  if (args) {
    // Transform arguments before inserting them
    for (var key in args) {
      switch (key.charAt(0)) {
        // Escaped only
        case '@':
          args[key] = Drupal.checkPlain(args[key]);
        break;
        // Pass-through
        case '!':
          break;
        // Escaped and placeholder
        case '%':
        default:
          args[key] = Drupal.theme('placeholder', args[key]);
          break;
      }
      str = str.replace(key, args[key]);
    }
  }
  return str;
};

Does this give some suggestion where to look? I'll see if other modules/settings seem to be responsible. I do have some specific language settings (domain-based language negotiation e.a.).

Peter Arius’s picture

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

I'm hit by this bug, too, and found that it's related to having a file attached to the node and having language set to other than English (the default language for my site is German).

Steps to reproduce:

0. Login as Administrator, using default language (German).
1. Create a page node.
2. Edit that node --> all vertical tabs, including "Authoring information", "Publishing options" ..., are present
3. Save the node --> everything OK.
4. Edit the node again. (still OK)
5. Add a file attachment, Save.
6. Edit the node again
--> no vertical tabs appear, but just the normal blocks, until "attachments". Some of the blocks (Menu settings, Revision information, Authoring information, Publishing options) are missing.
7. Save --> Author is set to empty, node is set to unpublished.
8. Publish the node again.
9. Set language to "English", or edit the node and delete the attachment.
10. Edit the node again --> all vertical tabs are visible again.

Tested with Firefox 3.6.3 and IE 8, if that might matter.

When I disable the Vertical Tabs module, the error does not occur.

I'm using:
Drupal 6.16
Vertical Tabs 6.x-1.0-rc1

Administration menu 6.x-1.5 Enabled Admin_menu
Menu Settings per Content Type 6.x-1.0 Disabled Ctm
Aggregator 6.15 Disabled Drupal
Blog 6.15 Enabled Drupal
Blog API 6.15 Disabled Drupal
Book 6.15 Enabled Drupal
Color 6.15 Disabled Drupal
Comment 6.15 Enabled Drupal
Contact 6.15 Enabled Drupal
Content translation 6.15 Enabled Drupal
Database logging 6.15 Enabled Drupal
Forum 6.15 Enabled Drupal
Help 6.15 Enabled Drupal
Locale 6.15 Enabled Drupal
Menu 6.15 Enabled Drupal
OpenID 6.15 Disabled Drupal
PHP filter 6.15 Disabled Drupal
Path 6.15 Enabled Drupal
Ping 6.15 Disabled Drupal
Poll 6.15 Enabled Drupal
Profile 6.15 Enabled Drupal
Search 6.15 Enabled Drupal
Statistics 6.15 Enabled Drupal
Syslog 6.15 Disabled Drupal
Taxonomy 6.15 Enabled Drupal
Throttle 6.15 Enabled Drupal
Tracker 6.15 Enabled Drupal
Trigger 6.15 Enabled Drupal
Update status 6.15 Enabled Drupal
Upload 6.15 Enabled Drupal
Block 6.15 Enabled Drupal
Filter 6.15 Enabled Drupal
Node 6.15 Enabled Drupal
System 6.15 Enabled Drupal
User 6.15 Enabled Drupal
Flag 6.x-1.2 Enabled Flag
Flag actions 6.x-1.2 Enabled Flag
SpamSpan 6.x-1.4 Enabled Spamspan
Simplenews 6.x-1.0 Enabled Simplenews
Simplenews action 6.x-1.0 Disabled Simplenews
Nodewords 6.x-1.11 Enabled Nodewords
Nodewords - basic meta tags 6.x-1.11 Enabled Nodewords
Nodewords - extra meta tags 6.x-1.11 Enabled Nodewords
Nodewords - site verification meta tags 6.x-1.11 Enabled Nodewords
Advanced help 6.x-1.2 Enabled Advanced_help
Advanced help example 6.x-1.2 Disabled Advanced_help
Curlypage 6.x-2.3 Disabled Curlypage
Global Redirect 6.x-1.2 Enabled Globalredirect
Google Translate links 6.x-2.0-beta5 Enabled Gtranslate_links
Node_Type_Filter 6.x-1.2 Enabled Node_type_filter
Pathauto 6.x-1.3 Enabled Pathauto
QA Checklist 6.x-1.0-beta2 Enabled Qa_checklist
Site Documentation 6.x-1.2 Enabled Sitedoc
Sub-path URL Aliasing 6.x-1.1 Enabled Subpath_alias
SuperCron 6.x-1.3 Enabled Supercron
Synonyms 6.x-1.0 Enabled Synonyms
Taxonomy Browser 6.x-1.4 Enabled Taxonomy_browser
Token 6.x-1.12 Enabled Token
Token actions 6.x-1.12 Enabled Token
TokenSTARTER 6.x-1.12 Enabled Token
Url alter 6.x-1.2 Enabled Url_alter
German Stemmer 6.x-1.1 Enabled De_stemmer
Cumulus 6.x-1.3 Enabled Cumulus
Tagadelic 6.x-1.2 Enabled Tagadelic
Vertical Tabs 6.x-1.0-rc1 Enabled Vertical_tabs
Access Permissions Fieldsets Manager 6.x-2.3 Enabled Util
Module Weights 6.x-2.3 Disabled Util
System Module 6.x-2.3 Enabled Util
Util 6.x-2.3 Enabled Util
Views 6.x-2.8 Enabled Views
Views UI 6.x-2.8 Enabled Views
Views exporter 6.x-2.8 Disabled Views

HTH,
Peter

Peter Arius’s picture

I just had a short look with the JS debugger. Here are some more details on the error Arjan reported in #2:

misc/drupal.js?U, around line 81 / 101:

Stack trace:
Drupal.t(singular, args) with singular = "1 attachment", args = { @count = 1 }
Drupal.formatPlural(size, '1 attachment', '@count attachments')
Drupal.verticalTabs.attachments()
(?)()
(?)()
Drupal.behaviors.verticalTabs()
(?)()
(?)()
attachBehaviors()
(?)()
(?)()
(?)()
(?)()
(?)()

78 Drupal.t = function(str, args) {
79 		// Fetch the localized version of the string.
80 		if (Drupal.locale.strings && Drupal.locale.strings[str]) {
                                // actual value of str = "1 attachment"
81 			str = Drupal.locale.strings[str];
			        // now, str = ["1 Anhang", "@count Anhänge"]
82 		}
83
84 		if (args) {
85 			// Transform arguments before inserting them
86 				for (var key in args) {
87 					switch (key.charAt(0)) {
88 						// Escaped only
89 						case '@':
90 							args[key] = Drupal.checkPlain(args[key]);
91 						break;
92 						// Pass-through
93 						case '!':
94 						break;
95 						// Escaped and placeholder
96 						case '%':
97 						default:
98 							args[key] = Drupal.theme('placeholder', args[key]);
99 						break;
100 				}
					// actual str = ["1 Anhang", "@count Anhänge"]
					// key = "@count"
					// args[key] = "1"
101 				str = str.replace(key, args[key]); // --> error: str.replace is not a function
102 			}
103 		}
104 	return str;
105}; 

Cheers,
Peter

dave reid’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)
Peter Arius’s picture

Hi Dave,

thanks a lot for pointing this out.

Alas, this bug makes Vertical Tabs, which I like very much, practically unusable 8-(. I'll try the patch proposed there.

Best regards,
Peter

soulfroys’s picture

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

I roll this patch: http://drupal.org/node/504506#comment-3414882 (cited above) and work just fine! Plus, fix other ghost bugs in upload + vertical tabs...

aminalid’s picture

Here is a workaround that worked for me (no need to patch anything):

- go to Site configuration / Vertical Tabs
- check the "Expose vertical tabs selection on the edit content type forms." box and save
- now go to the edit page of the content type that have File attachments enabled(/admin/content/node-type/your_content_type)
- in the "vertical tabs" section un-check the File attachments box and save

Everything should work now, but of course the file attachment fields will not be included as a vertical tab for the specific content type.
Better than patching the core for me :)

miiimooo’s picture

subscribe +1