SimplePortal

Support => English Support => Topic started by: Zipclaw on October 08, 2013, 05:17:23 PM

Title: Problem with the Shoutbox -- does not refresh
Post by: Zipclaw on October 08, 2013, 05:17:23 PM
Hi!

I have installed SimplePortal into my SMF 2.0.5. Really nice Mod, I like it a lot. But there is a problem with the shoutbox.

Whenever I type a message into the box and click on "Shout!" it doesn't refresh the shoutbox. The loading icon is rolling and rolling, but nothing happens. But when I reload the page the new message appears. The same happens when I want to delete a message.

During both actions the web console in Firefox gives me this message:

Quote
[23:08:40.459] TypeError: shout.getElementsByTagName(...)[0].childNodes[0] is undefined @ *url removed* /Themes/default/scripts/portal.js?235:122

The following mods, beside SimplePortal, are installed:

Additional Instant Messengers
Tagging System
Thank-o-matic
Ohara YouTube Embed

The mod "Nchat" was previously installed, but it didn't work properly anymore (Umlauts were broken).

Can anyone tell me how I can fix this? Thanks.
My SMF installation is here: http://www.zipclaw.de/forum/ (http://www.zipclaw.de/forum/) (german language)


Modified in hope getting approved.
Title: Re: Problem with the Shoutbox
Post by: AngelinaBelle on October 15, 2013, 08:55:50 AM
Zipclaw,
 
Problems such as this frequently bedevil the shoutbox, especially when other AJAX-based mods are installed.
It has been insanely difficult to get a handle on exactly what is going on in these cases.
I don't know that some effort is going into coding the shoutbox more defensively in the future, to avoid these collisions of AJAX scripts. 
 
My first advice is to turn off all other AJAX-based mods and see if the situation improves.
If that does not make a difference, the only thing for it is to create a test forum with an awful lot of debugging code to try to capture exactly where things go wrong.
That error message says that the code running in portal.js on line 235 fails because the desired XML document was not returned, or because it did not have the element with the tag name that was being searched for.
 
Are you interested in a massive debugging effort?
Title: Re: Problem with the Shoutbox -- does not refresh
Post by: Zipclaw on October 15, 2013, 11:09:45 AM
So, I have deinstalled all mods, except SimplePortal and I have tested the default theme of SMF and a new theme. But the problem still occurs. I'm going to install a fresh SMF with SimplePortal in a local XAMPP environment tomorrow.

What do you mean with massive debugging effort exactly?
Title: Re: Problem with the Shoutbox -- does not refresh
Post by: [SiNaN] on October 15, 2013, 12:07:15 PM
Any chance of enabling the shoutbox so that we can see the error ourselves?
Title: Re: Problem with the Shoutbox -- does not refresh
Post by: Zipclaw on October 15, 2013, 03:15:21 PM
Sure. It should be visible for guests now. Scroll down a bit, it's in the right panel.
Title: Re: Problem with the Shoutbox -- does not refresh
Post by: AngelinaBelle on October 15, 2013, 03:48:53 PM
Is it still invisible because guests cannot shout?
Title: Re: Problem with the Shoutbox -- does not refresh
Post by: Zipclaw on October 15, 2013, 04:08:42 PM
Sorry, my bad. It's visible for everyone now, but guests can not shout. Maybe I should create an account for you, if that's okay? I'll tell you the login informationen then.

EDIT:
I just noticed. that the Refresh-Button works now. I have no idea what caused that now. The Shout-Button is still broken, though.
Title: Re: Problem with the Shoutbox -- does not refresh
Post by: [SiNaN] on October 15, 2013, 05:06:25 PM
It seems to be related to the special characters in German. The content of the shouts containing those characters are empty in the XML response. Do you have any errors in the Error Log regarding entities? See if replacing the attached file with your copy of PortalShoutbox.template.php file in Themes/default directory fixes it.
Title: Re: Problem with the Shoutbox -- does not refresh
Post by: Zipclaw on October 15, 2013, 05:21:47 PM
No, there is no such error. But there are three new entries, caused by the new member, with a message I never seen before: "8: Undefined index: image" in BoardIndex.template.php (body_above sub template - eval?) in line 188.

Replacing the file PortalShoutbox.template.php has no effect.
Title: Re: Problem with the Shoutbox -- does not refresh
Post by: [SiNaN] on October 15, 2013, 05:24:40 PM
Are you sure that it had no effect? Try it again with a hard refresh to your browser. It seems to be working fine for me now. Can you delete the last 7 shouts in the shoutbox so I can check it again with the problematic shouts?
Title: Re: Problem with the Shoutbox -- does not refresh
Post by: Zipclaw on October 15, 2013, 05:32:12 PM
It doesn't have any effect for me. I cleared the cache and reloaded the site. But whenever I try to shout or delete a message, nothing seems to happen, except that endless animation I mentioned above. The web console in Firefox still gives me the same message as above.
Title: Re: Problem with the Shoutbox -- does not refresh
Post by: [SiNaN] on October 15, 2013, 05:38:37 PM
I can't unfortunately test it with Firefox. Is there a way you can view the XML response in Firefox? I use Chrome and I can do that with Developer Tools in it. I'm pretty sure it has something similar. If you can, please copy and past it within code tags here.

Also in the error, is it really three dots in the following part or something else like "content"?

Code: [Select]
shout.getElementsByTagName(...)[0].childNodes[0]
Title: Re: Problem with the Shoutbox -- does not refresh
Post by: Zipclaw on October 15, 2013, 05:51:59 PM
I had to look for it, but I think I got it.

Code: [Select]
<?xml version="1.0" encoding="ISO-8859-1"?> <smf> <shoutbox>2</shoutbox> <updated>1</updated> <error>0</error> <warning>0</warning> <reverse>0</reverse> <shout> <id>35</id> <author>&lt;a href=&quot;http://www.zipclaw.de/forum/index.php?action=profile;u=1&quot; title=&quot;am Heute um 23:46:33&quot; style=&quot;color: #FF0000;&quot;&gt;Zipclaw&lt;/a&gt;</author> <time>&lt;strong&gt;Heute&lt;/strong&gt; um 23:46:33</time> <timeclean>Heute um 23:46:33</timeclean> <delete></delete> <content>test</content> <is_me>0</is_me> </shout> <shout> <id>34</id> <author>&lt;a href=&quot;http://www.zipclaw.de/forum/index.php?action=profile;u=1&quot; title=&quot;am Heute um 23:29:49&quot; style=&quot;color: #FF0000;&quot;&gt;Zipclaw&lt;/a&gt;</author> <time>&lt;strong&gt;Heute&lt;/strong&gt; um 23:29:49</time> <timeclean>Heute um 23:29:49</timeclean> <delete></delete> <content>hm...</content> <is_me>0</is_me> </shout> <shout> <id>33</id> <author>&lt;a href=&quot;http://www.zipclaw.de/forum/index.php?action=profile;u=1&quot; title=&quot;am Heute um 23:29:05&quot; style=&quot;color: #FF0000;&quot;&gt;Zipclaw&lt;/a&gt;</author> <time>&lt;strong&gt;Heute&lt;/strong&gt; um 23:29:05</time> <timeclean>Heute um 23:29:05</timeclean> <delete></delete> <content>äöüß</content> <is_me>0</is_me> </shout> <shout> <id>32</id> <author>&lt;a href=&quot;http://www.zipclaw.de/forum/index.php?action=profile;u=17&quot; title=&quot;am Heute um 23:28:48&quot;&gt;seser&lt;/a&gt;</author> <time>&lt;strong&gt;Heute&lt;/strong&gt; um 23:28:48</time> <timeclean>Heute um 23:28:48</timeclean> <delete></delete> <content>Another</content> <is_me>0</is_me> </shout> <shout> <id>31</id> <author>&lt;a href=&quot;http://www.zipclaw.de/forum/index.php?action=profile;u=17&quot; title=&quot;am Heute um 23:28:36&quot;&gt;seser&lt;/a&gt;</author> <time>&lt;strong&gt;Heute&lt;/strong&gt; um 23:28:36</time> <timeclean>Heute um 23:28:36</timeclean> <delete></delete> <content>Test</content> <is_me>0</is_me> </shout> <shout> <id>22</id> <author>&lt;a href=&quot;http://www.zipclaw.de/forum/index.php?action=profile;u=1&quot; title=&quot;am Heute um 22:05:25&quot; style=&quot;color: #FF0000;&quot;&gt;Zipclaw&lt;/a&gt;</author> <time>&lt;strong&gt;Heute&lt;/strong&gt; um 22:05:25</time> <timeclean>Heute um 22:05:25</timeclean> <delete></delete> <content>hm...</content> <is_me>0</is_me> </shout> <shout> <id>21</id> <author>&lt;a href=&quot;http://www.zipclaw.de/forum/index.php?action=profile;u=1&quot; title=&quot;am Heute um 17:02:48&quot; style=&quot;color: #FF0000;&quot;&gt;Zipclaw&lt;/a&gt;</author> <time>&lt;strong&gt;Heute&lt;/strong&gt; um 17:02:48</time> <timeclean>Heute um 17:02:48</timeclean> <delete></delete> <content>Grmpf!</content> <is_me>0</is_me> </shout> <shout> <id>20</id> <author>&lt;a href=&quot;http://www.zipclaw.de/forum/index.php?action=profile;u=1&quot; title=&quot;am Heute um 16:59:49&quot; style=&quot;color: #FF0000;&quot;&gt;Zipclaw&lt;/a&gt;</author> <time>&lt;strong&gt;Heute&lt;/strong&gt; um 16:59:49</time> <timeclean>Heute um 16:59:49</timeclean> <delete></delete> <content>So, und nun?</content> <is_me>0</is_me> </shout> <shout> <id>19</id> <author>&lt;a href=&quot;http://www.zipclaw.de/forum/index.php?action=profile;u=1&quot; title=&quot;am Heute um 16:54:31&quot; style=&quot;color: #FF0000;&quot;&gt;Zipclaw&lt;/a&gt;</author> <time>&lt;strong&gt;Heute&lt;/strong&gt; um 16:54:31</time> <timeclean>Heute um 16:54:31</timeclean> <delete></delete> <content>Test...</content> <is_me>0</is_me> </shout> <shout> <id>18</id> <author>&lt;a href=&quot;http://www.zipclaw.de/forum/index.php?action=profile;u=1&quot; title=&quot;am Heute um 16:44:50&quot; style=&quot;color: #FF0000;&quot;&gt;Zipclaw&lt;/a&gt;</author> <time>&lt;strong&gt;Heute&lt;/strong&gt; um 16:44:50</time> <timeclean>Heute um 16:44:50</timeclean> <delete></delete> <content>Und es wird weiter getestet!</content> <is_me>0</is_me> </shout> <shout> <id>17</id> <author>&lt;a href=&quot;http://www.zipclaw.de/forum/index.php?action=profile;u=2&quot; title=&quot;am Mittwoch, 09. Oktober 2013, 15:49:32&quot; style=&quot;color: #00FF00;&quot;&gt;Sturmblut&lt;/a&gt;</author> <time>Mittwoch, 09. Oktober 2013, 15:49:32</time> <timeclean>Mittwoch, 09. Oktober 2013, 15:49:32</timeclean> <delete></delete> <content>Und der Zippy testet und testet. Und wenn er nicht gestorben ist, dann testet Zippy heute noch. ^^</content> <is_me>0</is_me> </shout> <shout> <id>15</id> <author>&lt;a href=&quot;http://www.zipclaw.de/forum/index.php?action=profile;u=1&quot; title=&quot;am Dienstag, 08. Oktober 2013, 22:56:03&quot; style=&quot;color: #FF0000;&quot;&gt;Zipclaw&lt;/a&gt;</author> <time>Dienstag, 08. Oktober 2013, 22:56:03</time> <timeclean>Dienstag, 08. Oktober 2013, 22:56:03</timeclean> <delete></delete> <content>Test</content> <is_me>0</is_me> </shout> <shout> <id>14</id> <author>&lt;a href=&quot;http://www.zipclaw.de/forum/index.php?action=profile;u=2&quot; title=&quot;am Montag, 07. Oktober 2013, 22:47:33&quot; style=&quot;color: #00FF00;&quot;&gt;Sturmblut&lt;/a&gt;</author> <time>Montag, 07. Oktober 2013, 22:47:33</time> <timeclean>Montag, 07. Oktober 2013, 22:47:33</timeclean> <delete></delete> <content>Der Meinung bin ich auch. ^^</content> <is_me>0</is_me> </shout> <shout> <id>13</id> <author>&lt;a href=&quot;http://www.zipclaw.de/forum/index.php?action=profile;u=1&quot; title=&quot;am Montag, 07. Oktober 2013, 17:16:33&quot; style=&quot;color: #FF0000;&quot;&gt;Zipclaw&lt;/a&gt;</author> <time>Montag, 07. Oktober 2013, 17:16:33</time> <timeclean>Montag, 07. Oktober 2013, 17:16:33</timeclean> <delete></delete> <content>Jap! &lt;img src=&quot;http://www.zipclaw.de/forum/Smileys/dinos/cheesy.gif&quot; alt=&quot;&#58;D&quot; title=&quot;Cheesy&quot; class=&quot;smiley&quot; /&gt;</content> <is_me>0</is_me> </shout> <shout> <id>12</id> <author>&lt;a href=&quot;http://www.zipclaw.de/forum/index.php?action=profile;u=3&quot; title=&quot;am Sonntag, 06. Oktober 2013, 21:05:03&quot; style=&quot;color: #00FF00;&quot;&gt;Spino&lt;/a&gt;</author> <time>Sonntag, 06. Oktober 2013, 21:05:03</time> <timeclean>Sonntag, 06. Oktober 2013, 21:05:03</timeclean> <delete></delete> <content>Sieht doch ganz gut soweit aus!</content> <is_me>0</is_me> </shout> <shout> <id>11</id> <author>&lt;a href=&quot;http://www.zipclaw.de/forum/index.php?action=profile;u=1&quot; title=&quot;am Sonntag, 06. Oktober 2013, 11:40:35&quot; style=&quot;color: #FF0000;&quot;&gt;Zipclaw&lt;/a&gt;</author> <time>Sonntag, 06. Oktober 2013, 11:40:35</time> <timeclean>Sonntag, 06. Oktober 2013, 11:40:35</timeclean> <delete></delete> <content>Forumtoast...</content> <is_me>0</is_me> </shout> <shout> <id>10</id> <author>&lt;a href=&quot;http://www.zipclaw.de/forum/index.php?action=profile;u=1&quot; title=&quot;am Sonntag, 06. Oktober 2013, 11:34:11&quot; style=&quot;color: #FF0000;&quot;&gt;Zipclaw&lt;/a&gt;</author> <time>Sonntag, 06. Oktober 2013, 11:34:11</time> <timeclean>Sonntag, 06. Oktober 2013, 11:34:11</timeclean> <delete></delete> <content>Toast</content> <is_me>0</is_me> </shout> <shout> <id>9</id> <author>&lt;a href=&quot;http://www.zipclaw.de/forum/index.php?action=profile;u=1&quot; title=&quot;am Sonntag, 06. Oktober 2013, 11:26:52&quot; style=&quot;color: #FF0000;&quot;&gt;Zipclaw&lt;/a&gt;</author> <time>Sonntag, 06. Oktober 2013, 11:26:52</time> <timeclean>Sonntag, 06. Oktober 2013, 11:26:52</timeclean> <delete></delete> <content>Blubb</content> <is_me>0</is_me> </shout> <shout> <id>8</id> <author>&lt;a href=&quot;http://www.zipclaw.de/forum/index.php?action=profile;u=1&quot; title=&quot;am Sonntag, 06. Oktober 2013, 11:18:02&quot; style=&quot;color: #FF0000;&quot;&gt;Zipclaw&lt;/a&gt;</author> <time>Sonntag, 06. Oktober 2013, 11:18:02</time> <timeclean>Sonntag, 06. Oktober 2013, 11:18:02</timeclean> <delete></delete> <content>Nerv...</content> <is_me>0</is_me> </shout> <shout> <id>7</id> <author>&lt;a href=&quot;http://www.zipclaw.de/forum/index.php?action=profile;u=1&quot; title=&quot;am Sonntag, 06. Oktober 2013, 11:12:51&quot; style=&quot;color: #FF0000;&quot;&gt;Zipclaw&lt;/a&gt;</author> <time>Sonntag, 06. Oktober 2013, 11:12:51</time> <timeclean>Sonntag, 06. Oktober 2013, 11:12:51</timeclean> <delete></delete> <content>Und nochmal...</content> <is_me>0</is_me> </shout> </smf>

Yes, the error looks like that in the console. When I copy it the message is exactly the same that I have posted in my first post.
Title: Re: Problem with the Shoutbox -- does not refresh
Post by: [SiNaN] on October 15, 2013, 05:57:57 PM
Hmmm, the XML response seems to be okay. I wonder if it's Firefox that can't handle the special characters there. Can you try this new template then?
Title: Re: Problem with the Shoutbox -- does not refresh
Post by: Zipclaw on October 15, 2013, 06:05:24 PM
I have replaced the template, but still no effect for me. Now, I have just tried it with the Internet Explorer and there is the same behaviour as in Firefox.
Title: Re: Problem with the Shoutbox -- does not refresh
Post by: [SiNaN] on October 15, 2013, 06:09:46 PM
I can't really think of anything else that might be going wrong at this time. If you can keep the shoutbox there for another day, I'll see if I can test it on Firefox and Internet Explorer.
Title: Re: Problem with the Shoutbox -- does not refresh
Post by: Zipclaw on October 15, 2013, 06:14:32 PM
It will stay.

I just had another thought, but I can't believe it could be the cause. Could the hoster, where my site is hosted, be the problem in this case? Any setting they made...?
Title: Re: Problem with the Shoutbox -- does not refresh
Post by: [SiNaN] on October 15, 2013, 06:41:31 PM
No, I don't think it's a problem related to the host.
Title: Re: Problem with the Shoutbox -- does not refresh
Post by: Zipclaw on October 16, 2013, 02:25:54 AM
Good to know. It was a stupid thought anyway.
Title: Re: Problem with the Shoutbox -- does not refresh
Post by: Zipclaw on November 12, 2013, 12:00:02 PM
Well... the problem still exists.
Title: Re: Problem with the Shoutbox -- does not refresh
Post by: [SiNaN] on January 02, 2014, 05:45:33 PM
I really didn't have any time to further look into this. I apologize. If you still are having this problem and want me to look at it we may try to debug it again these days as I finally have some time.
SimplePortal 2.3.8 © 2008-2024, SimplePortal