Topic-icon Uncaught ReferenceError: jfbcJQuery is not defined

Support Specialist
10 years 1 month ago #42693 by alzander
Sorry for the delay. I'm a bit confused on the actual issue. If you have the "Include jQuery / Bootstrap" setting enabled, that Javascript error should not show. That error is appearing because our jQuery/Bootstrap library file is not being included on the page.

You'll need to leave that setting enabled.

By activating the setting Include JQuery css changes I made to the login form popup are seen evil.
I hope I explained myself better

Can you explain what CSS issues the jQuery setting is causing? Please provide a URL where we can see the problems along with a description of what isn't correct. We'll gladly help however we can.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 1 month ago #42705 by baby80
Hello Alex,
Thank you for having responded to me.
I attach picture to make you understand the problem I have when active (include jquery).
This is the url of my site: MY Site
The module is located in the upper right corner.
File Attachment:

PS. at this time is not active (include jquery).
Inotre wanted to tell you that google chrome gives me the error only when you are not logged in to the site.
When I access the site the error is no longer displayed.
The topic has been locked.
Support Specialist
10 years 1 month ago #42711 by alzander
Alright. We did a little more investigation. It looks like a minor code change can be used to fix you up. Please test the following. Edit the /modules/mod_sclogin/mod_sclogin.php file. Around line 136, you'll see:
$needsBootstrap = $params->get('displayType') == 'modal' || ($params->get('showUserMenu') && $params->get('userMenuStyle') == 0);
if (!$helper->isJFBConnectInstalled && $params->get('loadJQuery') && ($needsBootstrap || $tfaLoaded))
{
    $document->addScript(JURI::base(true) . '/media/sourcecoast/js/jq-bootstrap-1.8.3.js');
    $document->addScriptDeclaration('if (typeof jfbcJQuery == "undefined") jfbcJQuery = jQuery;');
}
Replace that block with:
$needsBootstrap = $params->get('displayType') == 'modal' ||
        (!JFactory::getUser()->guest && ($params->get('showUserMenu') && $params->get('userMenuStyle') == 0));
if (!$helper->isJFBConnectInstalled)
{
    if ($params->get('loadJQuery'))
        $document->addScript(JURI::base(true) . '/media/sourcecoast/js/jq-bootstrap-1.8.3.js');
    if  ($needsBootstrap || $tfaLoaded)
        $document->addScriptDeclaration('if (typeof jfbcJQuery == "undefined") jfbcJQuery = jQuery;');
}
That will better detect if you already have jQuery installed and set things up properly.

Once you make that change, leave the "Include jQuery" setting disabled and, hopefully, things will start working as necessary.

Please let us know how that goes, and thanks again for your patience!

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 1 month ago #42712 by baby80
Hello Alex,
Thank you so much for your time.
I just made the changes that I've listed.
google chrome error is no longer displayed.
But now I have the problem that I had shown in the screen shot.
If you look at the pop-up login css changed.
Can you tell me how can I fix?
The topic has been locked.
Support Specialist
10 years 1 month ago #42713 by alzander
Ahhh.. I see the issue now.

When our Javascript is working properly, we move the block of code for the modal popup to the bottom of your page. That's done for some compatibility reasons for some templates.

In your CSS file, you have a lot of code targeting the SCLogin module that looks like:
.top-mods ul li
Since we move the modal popup area from the top of the page to a different section, it's no longer in the '.top-mods' block. You'll need to update those CSS queries that were targetting the SCLogin popup to use something like:
.sourcecoast.modal ul li
I hope that helps explain, but if you need more help, just let me know.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 1 month ago #42720 by baby80
Thanks Alex, now everything works fine. =)
Thank you again for availability
The topic has been locked.
Support Specialist
10 years 1 month ago #42729 by alzander
Awesome! Glad to hear we could help get things going for you, and sorry again for the delays last week. If you run into anything else, or have any other questions, just let me know.

Thanks,
Alex
The topic has been locked.