Topic-icon JS Error from SCLogin?

Active Subscriptions:

None
9 years 6 months ago #51946 by Beatsuka
Hello

I am using SClogin and JFBConnect

I have some JS errors that are messing with one of my extensions.
I know nothing about Javaschripts but the developer of the extension i'm using stated that one of the buttons are not working due to a JS error caused by my login module

He also stated that it was due to the Login module using mootools but as far as I can see it uses Jquery.. is there some part of SCLogin or JFBconnect that uses Mootools still?

I would love for your imput on the matter.
You can see the error here:
bilasidan.is/fyrirtaeki/entry/add

One of the blue button on top do not work. the one called "Stafrófsröð" (nr 3 in the top row)

Again.. I know 0.3% max about JS so Please bear with me on this :)

Best regards
Beatsuka
The topic has been locked.
Support Specialist
9 years 6 months ago #51949 by alzander
Replied by alzander on topic JS Error from SCLogin?
The Javascript error is coming from the following block of code on the page:
<style>

[id^="outerLP_"]{opacity:150;display:none;top:0px;left:235px;}

</style>

<script>
window.addEvent('domready', function() {
	var lgpx = new Element('div#lgp');
	$$('body')[0].adopt(lgpx);
	$$('.loginplusx').addEvent('click', function(event){
		event.stop(); 
		$('lgp').setStyle('position','fixed');
		$('lgp').setStyle('width','100%');
		$('lgp').setStyle('height','100%');
		$('lgp').setStyle('top','0');
		$('lgp').setStyle('left','0');
		$('lgp').setStyle('background','rgba(255,255,255,0.8)');
		$('lgp').setStyle('z-index','100000000');
		$$('div[id^=outerLP_]').setStyle('display','block');
		$$('div[id^=outerLP_]').fade('in');
		$$('div[id^=outerLP_]').setStyle('position','absolute');
		$$('div[id^=outerLP_]').setStyle('z-index','200000000000');
	});

	$$('input[value^=Log ]').addEvent('click', function(event){
		$$('div[id^=outerLP_]').fade('out');
		$$('div[id^=outerLP_]').setStyle('display','none');
	});
	$('lgp').addEvent('click', function(event){
		$$('div[id^=outerLP_]').fade('out');
		$$('div[id^=outerLP_]').setStyle('display','none');
		this.setStyle('width','0');
		this.setStyle('height','0');

	});

});
</script>
I have no idea what's inserting that code. However, it's inserting in between a block of JFBConnect on top and a SobiPro block of code underneath.

I'd suggest looking at your system plugins and see what plugins are enabled in between the JFBCSystem and SobiPro plugins and test disabling them (if it's not too many) and seeing if that helps fix the issue.

Again, I don't think this is an SCLogin issue, but hopefully that helps you narrow things down.

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

None
9 years 6 months ago #51987 by Beatsuka
Replied by Beatsuka on topic JS Error from SCLogin?
Thank you Alex

As I suspected, your login module is not the problem.
You helped me learn how to find out what code is giving error. and it is a code from a old loginform I tried but uninstalled.

For some reason the code is still there even though program was uninstalled and I can not for the life of me find out where it is so i can comment it out (or remove it)

But I am glad it was not your extension and I thank you so much for your help! :)

Now I'm off to find out where I can find that damn code!! lol

Best wishes to you all!
Beatsuka
The topic has been locked.
Support Specialist
9 years 6 months ago #51991 by alzander
Replied by alzander on topic JS Error from SCLogin?
Glad to hear we could help, even a little. I'm not sure where to check either if the module has been removed. Some other suggestions that may help narrow things down:
* Make sure all caching or 'optimization' extensions/add-ons are disabled when you tinker. Otherwise, you may disable the right plugin/module, but the code is still cached on the page.
* Try a different template and see if that block still exists. If not, the code may have been hard-coded into the template somehow.
* Disable random, seemingly unrelated plugins or modules methodically until the code goes away. It's got to come from somewhere. Tedious work, but necessary.

I hope that helps some more,
Alex
The topic has been locked.