SimplePortal

Support => English Support => Topic started by: ♦ Ninja ZX-10RR ♦ on December 01, 2014, 03:01:55 PM

Title: Shoutbox update error
Post by: ♦ Ninja ZX-10RR ♦ on December 01, 2014, 03:01:55 PM
This is the error I am getting if I inspect the browser
Quote
Uncaught TypeError: Object #<error> has no method 'getElementsByTagName' portal.js?236:104

And the Shoutbox doesn't update anymore unless I manually refresh the page... It's probably some kind of conflict with the Project Snow (http://custom.simplemachines.org/mods/index.php?mod=2356) mod... Are there any fixes? Please I would really love to have both mods up and running... :(
Thanks in advance... :(

Edited by Sinan: updated the topic title.
Title: Re: Uncaught TypeError: Object #<error> has no method 'getElementsByTagName' portal.
Post by: ♦ Ninja ZX-10RR ♦ on December 01, 2014, 03:43:39 PM
Little update... I tried to uninstall the Project Snow mod but the problem is still there, no refresh unless doing a page refresh :| Also tried to uninstall the other FancyBox 4SMF that has a javascript but the issue is still there.
Title: Re: Uncaught TypeError: Object #<error> has no method 'getElementsByTagName' portal.
Post by: Burke Knight on December 01, 2014, 06:46:29 PM
Are you setting the shoutbox up to auto-refresh?
I'm not certain what the server resources are on the auto-refresh, but I'd keep an eye on it, to be sure it's not overusing the server resources.

However, the first part needs more info, like what is the actual error that happens. Not what you posted, but what led you to finding that, if know what I mean.
Title: Re: Uncaught TypeError: Object #<error> has no method 'getElementsByTagName' portal.
Post by: ♦ Ninja ZX-10RR ♦ on December 01, 2014, 06:50:13 PM
Thanks for the reply matey :)
Just inspecting the shoutbox itself my browser showed me that error with a red cross (which stands for a somehow critical error) and yeah I have set the shoutbox to auto-refresh but every 8 seconds or something so not continuously. I will tweak that accordingly to the traffic.
I don't have more details than those, it's just that...
Title: Re: Uncaught TypeError: Object #<error> has no method 'getElementsByTagName' portal.
Post by: [SiNaN] on December 03, 2014, 01:44:20 PM
I'll have to debug this myself to find out what might be going wrong. Any chance you can provide me with temporary access to your portal, shoutbox? You can send the information to me via pm.
Title: Re: Uncaught TypeError: Object #<error> has no method 'getElementsByTagName' portal.
Post by: ♦ Ninja ZX-10RR ♦ on December 03, 2014, 02:18:44 PM
As it was conflicting with that other mod I tried to uninstall it and it went away... But the shoutbox doesn't work properly, it doesn't update unless the page is being manually refreshed and I can't understand why since I uninstalled all new mods with the slightest trace of a javascript file... The main problem now became that one >_< plus, the shoutbox sound is not working anymore too, I have no idea wtf happened to my shoutbox :/ I might try to reinstall the whole SimplePortal I am truly lost.
If you need access well my test account is semi-public, delete these after you read so I don't even need to bother you via pm ;) username: *** pw: *** http://vige.altervista.org/forum/index.php?action=forum (since the shoutbox is being displayed only on the board index)
Title: Re: Uncaught TypeError: Object #<error> has no method 'getElementsByTagName' portal.
Post by: [SiNaN] on December 07, 2014, 09:28:34 AM
I don't see any shoutboxes using the test account you provided. Can you please make sure that I can see it?
Title: Re: Shoutbox update error
Post by: ♦ Ninja ZX-10RR ♦ on December 07, 2014, 09:44:45 AM
Done, sorry, I had removed it coz I re-installed the Portal but at no avail. It's now available again :)
Title: Re: Shoutbox update error
Post by: [SiNaN] on December 07, 2014, 09:46:55 AM
I still can't see it. It seems to me that the portal is on maintenance mode. If it is, can you make sure that I can see the portal even when it's on maintenance mode?
Title: Re: Shoutbox update error
Post by: ♦ Ninja ZX-10RR ♦ on December 07, 2014, 09:50:36 AM
Forgot it toggle it back, sorry. Try again #_# I posted also a shout in which I say that the shoutbox was meant to show up in the Foruml view only but instead when I tried to save the settings it was switching back automatically to "Portal" O.o I just used the "Everywhere" thing and it worked, despite it's not what I wanted... I just want to let you see that though.
Plus, just granted you full admin permissions with SimplePortal so that you can see its settings.
Title: Re: Shoutbox update error
Post by: [SiNaN] on December 07, 2014, 10:05:29 AM
There shouldn't be any problems setting the display options, but that's another case.

The problem with the shoutbox is caused by a coding mistake. View the source for the following page:

vige.altervista.org/forum/index.php?action=portal;sa=shoutbox;shoutbox_id=3;xml

You'll notice that there is a single blank space at the beginning, right before the <?xml tag. There shouldn't be. Check the one on our site:

simpleportal.net/index.php?action=portal;sa=shoutbox;shoutbox_id=1;xml

It's either a mod that adds that extraneous space erroneously or you made a mistake while you were editing the files manually. There is no way for me guess where that space might be coming from. You have to go over all the changes you have made to find out what's causing it.

I should also note that this evil extra space not only affects SimplePortal shoutbox but all other SMF functions that use AJAX like the detailed stats for each month on more stats page or quick modify posts. It may not affect some other custom mods that use AJAX because not every mod is coded in a way that makes it a real part of SMF.
Title: Re: Shoutbox update error
Post by: ♦ Ninja ZX-10RR ♦ on December 07, 2014, 10:30:58 AM
It might be an update... I had a problem a while ago with the quick reply... Also there there was my previous mods list and it comes in a handy because there was also SimplePortal from the first time I installed it (and it was working). http://www.italiansmf.net/forum/index.php?topic=1196.msg7033#msg7033 I was suggested to remove a single line in a query that was bugged by the anti-spam links and everything went back to normal.
Anyway I guess that any mod I installed after the 22th of november could be the issue, right? I will try and report you back so I'll also tell the mod author to fix it and warn people about it.
Thanks for everything, if you have any other ideas or anything just tell me and I will be replying asap since I have notifications enabled for this one :)
Title: Re: Shoutbox update error
Post by: [SiNaN] on December 07, 2014, 10:49:23 AM
It's not something I can make guesses about by looking at a list - it can be any mod, really! You just have to uninstall them one by one and check.
Title: Re: Shoutbox update error
Post by: ♦ Ninja ZX-10RR ♦ on December 07, 2014, 11:11:52 AM
I found it dude! You have been really vital for this. It was the number 147 "Guest registration notification", due to what you said I am filing a security report about it because it breaks AJAX functionalities (so it does really destroy something). Thanks for all the help you have been extremely vital! I'm forwarding these informations to the mod author and the sm.org customization team.
Thanks again, marking as solved.
Title: Re: Shoutbox update error
Post by: [SiNaN] on December 07, 2014, 11:16:26 AM
Yeah, that seems to be the one. See the file Sources/GuestRegistrationNotification.php. At the beginning, there is an extra space right before the <?php tag.

You're welcome. Glad that you could solve it!
SimplePortal 2.3.8 © 2008-2024, SimplePortal