Topic-icon Modal popup not working with Jomsocial for j!3?

Active Subscriptions:

None
Hi guys/Alex, further to my earlier query (which you fixed :) ) I have now installed the RC1 release of the new Jomsocial and of course the modal popup of the login isn't working any more! Grrrr.....

When it's not in popup mode the login module and JFBConnect component are working and connecting everything together, except for an issue with the visibility of the little popup 'logging in' message (which we'll look at separately) but the main thing is that in popup mode the login button isn't working at all now. Can you have a look please and advise?

The url is www.countydownspectator.com and button is in the top right corner, position Top 2 of the Joomlaxtc template.

cheers, Russ
The topic has been locked.
Support Specialist
10 years 9 months ago #34317 by alzander
Russ,
First, and highly unlikely that it's related, your template has no closing </html> tag. You should add that just for completeness.

Now, to your actually issue, I'm going out on a weird limb here because I really don't know the exact cause. There is some funkyness with how the browser is reading your head area of your site though, which is causing some Javascript to be loaded all out of order. The cause *looks* to be this line:
<object><noscript><meta http-equiv="refresh" content="0; URL=http://www.countydownspectator.com/no-javascript.php" /></noscript></object>
That is being loaded in the head section of your page, but object tags can only be placed in the body. Because it's in the head, the browser is automatically closing the head and beginning the body portion of the document and then things go out of whack.

All I can suggest for now is removing that line (either in your template or a plugin) and hopefully that will fix the Javascript issues. If not, let us know and we can look into what else may be causing issues.

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

None
10 years 9 months ago #34320 by rmoore1904
Hi Alex, sorry mate I can't trace where that line is coming from I'm afraid.

From when the modal popup was last working I haven't touched the template but have upgraded JFBConnect & SC1 and installed the RC1 of Jomsocial 3.0. I've tried looking for the line in the template files (maybe I'm missing something but can't see it) and have tried disabling all of the most recent plugins but nothing has made a difference. could you takeanother look please?

There's an alternate login/registration form at Community/login (main menu bar) if you want to register and see the other things: button rolllover not drawing properly, 'loggin in' message display etc, but obviously there's a big problem with Javascript somewhere. I'm reluctant to uninstall JS3 but will if you can't see anything else.

Cheers again, R
The topic has been locked.
Support Specialist
10 years 9 months ago #34328 by alzander
I understand you started seeing this issue with JomSocial v3, but I really don't think that's related. On your homepage, there's not anything JomSocial related even being loaded. That object tag is definitely wonky though and causing browser detection and rendering issues.

With a little more debug, I'd say it's likely a plugin that's adding that code. If I try with the Protostar template on your site, I still see it, so it's not 'in' your template. There is a big block of Javascript above the object line which may also be related... If you look at it, it may help you narrow down where to look:
<style type="text/css">@media print { body { display:none } } </style>
  <script type="text/javascript">/* <![CDATA[ */if(window.location.protocol.indexOf("file")!=-1){location="about:blank";alert("This page cannot view as a file. Please visit our website to view the page.");}if(document.domain.toLowerCase().replace("www.","")!="www.countydownspectator.com".toLowerCase().replace("www.","")){alert("Invalid Domain, Please visit our website to view the page.");location="about:blank";}function noCtrlKey(e){var noKeys = new Array("a", "s", "u", "n", "c", "x", "v", "j");var key;var isCtrlKey;if(window.event){key = window.event.keyCode;if(window.event.ctrlKey){isCtrlKey = true;}else{isCtrlKey = false;}}else{key = e.which;if(e.ctrlKey){isCtrlKey = true;}else{isCtrlKey = false;}}if(isCtrlKey){for(i=0; i<noKeys.length; i++){if(noKeys[i].toLowerCase() == String.fromCharCode(key).toLowerCase()){alert("This function is restricted.");return false;}}}return true;}function noSelection(target){if (typeof target.onselectstart!="undefined"){target.onselectstart=function(){return false};}else if (typeof target.style.MozUserSelect!="undefined"){target.style.MozUserSelect="none";}else{target.onmousedown=function(){return false}}target.style.cursor = "default";}function ie_nrc(){alert("This function is restricted.");return false;}function ns_nrc(e){if(e.which==2||e.which==3){alert("This function is restricted.");return false;}}if(document.layers){document.captureEvents(Event.MOUSEDOWN);document.onmousedown=ns_nrc;}document.oncontextmenu=ie_nrc;/* ]]> */</script>
  <object><noscript><meta http-equiv="refresh" content="0; URL=http://www.countydownspectator.com/no-javascript.php" /></noscript></object>
It looks like a big blob of 'protection' type code to prevent scraping/abuse of your site. Do you have a plugin like that? If so, please try disabling it and see if that helps things.

Keep us posted on what you find. I'd hate to see you roll back JomSocial because, like I mentioned above, I really don't think that's the culprit.

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

None
10 years 9 months ago #34335 by rmoore1904
Hi Alex, found it!

What had happened was that I updated the SCLogin module to 3.03 but had forgotten about the little code fix, i.e.

if($params->get('loadBootstrap'))
{
JHtml::_('bootstrap.framework');
$document->addStyleSheet('modules/mod_sclogin/css/sc_bootstrap.css');
}

Once I had uninstalled Jomsocial, and systematically disabled all of the other plugins, components & modules on the site, I re-read the forum post about that bootstrap issue and remembered. Doh!

Sorry to have bothered you man....

Russ
The topic has been locked.
Support Specialist
10 years 9 months ago #34353 by alzander
Russ,
Doh! is right! That's a fix we were supposed to have investigated and included a fix in the latest release. It looks like I never fully submitted the bug report and so it wasn't looked into. The idea isn't to make you implement that change with every future release.

I have properly added and verified that the bug-report is in our to-do list now.

I'm very sorry for the inconvenience. Hopefully this will be in the next release (no estimated time right now, which is a good things as there are no other bugs), but obviously keep this in mind when you upgrade... just in case :D

Thanks,
Alex
The topic has been locked.