[FIX] JavaScript error cbshowtabs array undefined

16 years 8 months ago #43932 by drlovegun
I am seeing the same error. Is there a fix yet? Here are the Tabs I am using:

cbshowtabsArray.push( [,'tabPanecb_tabmain.setSelectedIndex( 0 );'] );
cbshowtabsArray.push( [,'tabPanecb_tabmain.setSelectedIndex( 1 );'] );
cbshowtabsArray.push( [,'tabPanecb_tabmain.setSelectedIndex( 2 );'] );
cbshowtabsArray.push( [,'tabPanecb_tabmain.setSelectedIndex( 3 );'] );
cbshowtabsArray.push( [,'tabPanecb_tabmain.setSelectedIndex( 4 );'] );
cbshowtabsArray.push( [,'tabPanecb_tabmain.setSelectedIndex( 5 );'] );

Please Log in to join the conversation.

16 years 8 months ago #43935 by drlovegun
What parameters are you talking about?

Thanks

Please Log in to join the conversation.

16 years 5 months ago #49897 by schipperijn
I did had the same error. I have unplublished all tabs, can not unpiblish contact info. Contact info is at head, with Panel with tabs. When I unpublisg aditional info (also at head) and place tab contact at Tabmain the error is not there anymore.

When I than publish aditional info at Head the error is back.
So... I think it has something to do with head... there where the title is on.

Post edited by: schipperijn, at: 2007/11/10 17:17

Please Log in to join the conversation.

16 years 5 months ago #50041 by pavkata
Hi,

I have the same issue with cbshowtabsarray message displayed in IE.

Did anyone manage to find a solution of this problem?

regards,

P.

Please Log in to join the conversation.

16 years 5 months ago #50240 by beat
It's fixed now for next CB version.

Since we got CB supporters in this thread (thank you ! :) ), here a quick-fix for CB 1.1:

in file administrator/components/com_comprofiler/comprofiler.class.php

Search for :

[code:1]if ( ! $functionOutputed ) {[/code:1]

and replace everything between that line and the closing } (that line and closing tag included) by:

[code:1] if ( ! $functionOutputed ) {
global $_CB_ui;
$head = "<script type=\"text/javascript\"><!--//--><![CDATA[//><!--\n"
. "var cbshowtabsArray = new Array();\n"
. "function showCBTab( sName ) {\n"
. " if ( typeof(sName) == 'string' ) {\n"
. " sName = sName.toLowerCase();\n"
. " }\n"
. " for (var i=0;i<cbshowtabsArray.length;i++) {\n"
. " for (var j=0;j<cbshowtabsArray[0].length;j++) {\n"
. " if (cbshowtabsArray[0][j] == sName) {\n"
. " eval(cbshowtabsArray[1]);\n"
. " return;\n"
. " }\n"
. " }\n"
. " }\n"
. "}\n"
. "//--><!]]></script>\n";
addCbHeadTag( $_CB_ui, $head );
$functionOutputed = true;
}
[/code:1]

Post edited by: beat, at: 2007/11/15 11:05

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

16 years 5 months ago #50255 by pavkata
Hi,

thank you for the fix, I replaced the code in the comprofiler.class.php but I got this error:

Fatal error: Call to a member function getUi() on a non-object in D:\xampp\htdocs\cadlore\administrator\components\com_comprofiler\comprofiler.class.php on line 4152

any idea what I am doing wrong?

Thanks in advance

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.265 seconds

Facebook Twitter LinkedIn