Topic-icon SC Login doesn't work correctly

Support Specialist
10 years 8 months ago #35376 by alzander
Sorry for the delay, and thanks for narrowing things down to JomSocial. The problem is a conflict with JomSocial 3.0 only since they now include the Bootstrap Javascript files.

To fix, please edit the /modules/mod_sclogin/mod_sclogin.php file. Around line 95, you'll see:
if($needsBootstrap)
        $document->addScript('modules/mod_sclogin/js/vendor/bootstrap.min.js');
Update that to:
if (!(JFactory::getApplication()->input->getCmd('option') == 'com_community' &&
                    JFile::exists(JPATH_SITE.'/components/com_community/assets/bootstrap/bootstrap.min.js')))
                $document->addScript(JURI::base(true) . '/media/sourcecoast/js/bootstrap.min.js');
Let me know how that goes. That fix is planned for the next release as well.

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

None
10 years 8 months ago #35379 by LeGiangAnh
Hi Alex,

I cannot find that line: screencast.com/t/SJ7TxWr4swrs
Please notice that i use joomla 3.1
The topic has been locked.
Support Specialist
10 years 8 months ago #35412 by alzander
We'll have to do more testing, but that honestly sounds like a bug with JomSocial. They shouldn't be loading their own version of the Bootstrap Javascript in Joomla 3.x and instead use the built-in version with Joomla. That way, there's no conflicts.

What I can recommend right now is to wrap that JHtml::_('bootstrap.framework'); call in the same check as I posted above, like:
if (!(JFactory::getApplication()->input->getCmd('option') == 'com_community' && 
                    JFile::exists(JPATH_SITE.'/components/com_community/assets/bootstrap/bootstrap.min.js')))
   JHtml::_('bootstrap.framework');
Let me know how that goes, but again, I haven't tested that change with Joomla 3.

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

None
10 years 8 months ago - 10 years 8 months ago #35415 by LeGiangAnh
It works. There is no black screen anymore! Thank you. The code I use:
if($params->get('loadBootstrap'))
{		
	if (!(JFactory::getApplication()->input->getCmd('option') == 'com_community' && 
                    JFile::exists(JPATH_SITE.'/components/com_community/assets/bootstrap/bootstrap.min.js'))) 
   JHtml::_('bootstrap.framework'); 
    $document->addStyleSheet('modules/mod_sclogin/css/sc_bootstrap.css');
     //SC16
}
However, the issue with forget password/user name images still exist.

Thanks,
Giang Anh
Last edit: 10 years 8 months ago by LeGiangAnh.
The topic has been locked.