[FIX] JavaScript error cbshowtabs array undefined

11 years 11 months ago #50261 by beat
pavkata wrote:

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


Sorry, my error, code was not completely adapated to CB 1.1, i edited my post above with the CB 1.1 code. Should now work, please confirm.

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
11 years 11 months ago #50318 by pavkata
This fix worked :)

Thank you for providing it :)

best regards,

Pavel
11 years 10 months ago #53269 by subhumanjackyl
beat wrote:

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


Can someone please give me an idea as to what area of the file this code is located...ive looked up and down over an over, but cant find it.

Thanks
11 years 10 months ago #53270 by subhumanjackyl
subhumanjackyl wrote:

beat wrote:

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


Can someone please give me an idea as to what area of the file this code is located...ive looked up and down over an over, but cant find it.

Thanks


I found it! Thank the Lord!

For anyone else searching for it, line 1134 near the bottom.

Post edited by: subhumanjackyl, at: 2007/12/30 00:04
11 years 10 months ago #53273 by nicowolf
Thank you so much for the code fix! :)
11 years 9 months ago #55959 by mpausch
Hi Beat and everyone else.

I just upgraded to cb 1.1 and Joomla 1.0.14 and this same error appeared.

I checked the comprofiler.class.php file but the fix in this thread had already been applied to the file in cb 1.1

So I started checking by unpublishing items and testing. Noticed that when I unpublish CB captcha under tab manager, the error disappears.. but of course so does the captcha feature at registration.

Any help would be appreciated.
Moderators: beatnantkrileon
Time to create page: 0.464 seconds
Facebook Twitter Google LinkedIn