Arrow Home arrow Forums
larger font smaller font default font Fixed screen resolution Auto adjust screen size

Joomlapolis Forums  


<< Start < Prev 1 2 3 4 Next > End >>
[FIX] JavaScript error cbshowtabs array undefined
Date: 2007/08/17 00:39 By: nicowolf Status: User  
Karma: 0  
Fresh Joomlapolitan

Posts: 10
graphgraph
Hi everyone,

I recently upgraded from cb 1.0.2 to cb 1.1 using the expert upgrade instructions.

I did everything that was instructed in the readme file.

CB works without any problems except for a javascript error in the bottom left corner of IE7 that reads: 'cbshowtabsArray' is undefined.

I looked in the files that got copied over and all looks fine to me. The object does get created in comprofiler.class.php

But when I look at the source code that gets generated in the html format I see this:

Code:

 <script type="text/javascript"><!--//--><![CDATA[//><!-- var tabPanecb_head; cbshowtabsArray.push( [['portrait','20','getportraittab'],'tabPanecb_head.setSelectedIndex( 0 );'] );



and after a few lines, the object is created:

Code:

 <script type="text/javascript"><!--//--><![CDATA[//><!-- var tabPanecb_tabmain; var cbshowtabsArray = new Array(); function showCBTabsName ) {     if ( typeof(sName) == 'string' ) {         sName sName.toLowerCase();     }     for (var i=0;i<cbshowtabsArray.length;i++) {         for (var j=0;j<cbshowtabsArray[i][0].length;j++) {             if (cbshowtabsArray[i][0][j] == sName) {                 eval(cbshowtabsArray[i][1]);                 return;             }         }     } } cbshowtabsArray.push( [['contact info','11','getcontacttab'],'tabPanecb_tabmain.setSelectedIndex( 0 );'] ); cbshowtabsArray.push( [['my blogs','14','getblogtab'],'tabPanecb_tabmain.setSelectedIndex( 1 );'] ); cbshowtabsArray.push( [['connections','15','getconnectiontab'],'tabPanecb_tabmain.setSelectedIndex( 2 );'] ); cbshowtabsArray.push( [['my photos','24','getprofilegallerytab'],'tabPanecb_tabmain.setSelectedIndex( 3 );'] ); cbshowtabsArray.push( [['events','29','getattendeventstab'],'tabPanecb_tabmain.setSelectedIndex( 4 );'] ); cbshowtabsArray.push( [['ads','31','getadstab'],'tabPanecb_tabmain.setSelectedIndex( 5 );'] );



So basically, the error occurs because the call to the object occurs before the object gets created (for the getportrait tab). Does anyone know where in the code we could fix this so that the javascript object gets created before any tabs are loaded?

Thanks in advance...

Post edited by: nicowolf, at: 2007/08/17 01:48

Post edited by: beat, at: 2007/08/17 02:11

Post edited by: beat, at: 2007/11/15 01:37
Click here to see the profile of this user The administrator has disabled public write access.

Re:JavaScript error cbshowtabs array undefined
Date: 2007/08/17 02:11 By: beat Status: Admin  
Karma: 238  
Admin

Posts: 3998
graphgraph
Confirming as bug:

Could reproduce by changing portrait display tab from raw to tab.

Moving to bugs and changing title.

No quick fix yet. Fix proposals welcome
Beat - Developer on Community Builder core Team
- If you like CB and this forum, you will love Nick's CB 1.1 reference manual ! : Click here to Get it now
- Would like to help us move faster ? Get it, and/or help us spend more time coding by helping others in this forum, many thanks
Click here to see the profile of this user The administrator has disabled public write access.

Re:[CONF] JavaScript error cbshowtabs array undefined
Date: 2007/08/17 07:30 By: nicowolf Status: User  
Karma: 0  
Fresh Joomlapolitan

Posts: 10
graphgraph
Hey Beat,

Thanks for the update, I will work on it to come up with a solution. I think it should be pretty straight forward, just need to find how we create the object before any other tab is written out. I am still trying to familiarize myself with the CB code...

Nico
Click here to see the profile of this user The administrator has disabled public write access.

Re:[CONF] JavaScript error cbshowtabs array undefined
Date: 2007/08/18 04:43 By: beat Status: Admin  
Karma: 238  
Admin

Posts: 3998
graphgraph
Thanks

Problem is probably in comprofiler.class.php .
Beat - Developer on Community Builder core Team
- If you like CB and this forum, you will love Nick's CB 1.1 reference manual ! : Click here to Get it now
- Would like to help us move faster ? Get it, and/or help us spend more time coding by helping others in this forum, many thanks
Click here to see the profile of this user The administrator has disabled public write access.

Re:[CONF] JavaScript error cbshowtabs array undefined
Date: 2007/08/19 20:24 By: joomlas Status: User  
Karma: 0  
Fresh Joomlapolitan

Posts: 6
graphgraph
Try to change parameter under cb.menu under plug-in management! I have solved similar issue! http://www.mrkonjicgrad.com/korisnici/userslist/

Post edited by: joomlas, at: 2007/08/19 20:26
Click here to see the profile of this user The administrator has disabled public write access.

Re:[CONF] JavaScript error cbshowtabs array undefined
Date: 2007/08/19 20:36 By: nicowolf Status: User  
Karma: 0  
Fresh Joomlapolitan

Posts: 10
graphgraph
Thank you for your suggestion.
I will try and apply this solution while I try to fix the code, that would be a more perminent solution for the rest of the community, incase they still wanted to have the flexibility of choice in the plugin parameters... Thanks again...
Click here to see the profile of this user The administrator has disabled public write access.

<< Start < Prev 1 2 3 4 Next > End >>

Documentation

Documentation Subscription Service
(updated for CB 1.2 RC2)

What?

Why?

Where?

Just click here for answers!

Click here for a yearly subscription: subscribe now

Download Latest Release

The latest stable Community Builder Release is version 1.1 for Joomla 1.0 and Mambo.
You need to be a registered member of Joomlapolis to download.

The latest release candidate of Community Builder is version 1.2 RC3, native for Joomla 1.0, 1.5 and Mambo.
It is available as "thank you" to all CB documentation subscribers at this time.

CB Login