collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 752
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Thanks for having an interest with our portal. If you have any requests for features, have a look at the Feature Requests board.

Author Topic: shoutbox new shouts don't appear until go to history  (Read 3848 times)

0 Members and 1 Guest are viewing this topic.

Offline hidden_ghost

  • Semi Newbie
  • *
  • Posts: 8
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
shoutbox new shouts don't appear until go to history
« on: March 05, 2010, 01:22:14 AM »
hi I have a problem with shoutbox
when I post new shout nothing appear until I go to history
ever if I pressed refresh

it should be refreshing after 1 sec
no mods except sp

I tried GC , IE & FF
I tried more than one them and the default one also

for test
www.tu-eng.tk
test
123456


thx for ur help

Offline Sophie

  • Newbie
  • Posts: 2
  • Gender: Female
  • SMF Version: None
  • SP Version: None
Re: shoutbox new shouts don't appear until go to history
« Reply #1 on: March 05, 2010, 08:13:09 AM »
yeah i know and this forum is totally boring have you ever found a boring forum than this..? >:-D and after i tell something extra they start saying stop spamming....... :ill: >:( >:( >:( >:(

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: shoutbox new shouts don't appear until go to history
« Reply #2 on: March 05, 2010, 08:59:06 AM »
One thing I noticed is that you are getting a recurring error on the page, in function onShoutReceived, which may be your problem:
Quote
Message: 'getElementsByTagName(...).0' is null or not an object
Line: 95
Char: 2
Code: 0
URI: http://tu-eng.tk/forum/Themes/default/scripts/portal.js
That is the very first line of the function.
 
Is anyone else running a shoutbox in a left-to-right forum?
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline hidden_ghost

  • Semi Newbie
  • *
  • Posts: 8
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: shoutbox new shouts don't appear until go to history
« Reply #3 on: March 05, 2010, 08:31:34 PM »
do you mean right to left ?

if the recurring error how can i solve this prob

thx 4 ur help

Offline hidden_ghost

  • Semi Newbie
  • *
  • Posts: 8
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: shoutbox new shouts don't appear until go to history
« Reply #4 on: March 05, 2010, 08:35:28 PM »
yeah i know and this forum is totally boring have you ever found a boring forum than this..? >:-D and after i tell something extra they start saying stop spamming....... :ill: >:( >:( >:( >:(

hmmmmmmm
I really don't know weather u r joking  :) :(
my native language isn't en

Offline exx007

  • Just Registered
  • Posts: 1
  • SMF Version: None
  • SP Version: None
Re: shoutbox new shouts don't appear until go to history
« Reply #5 on: March 06, 2010, 09:12:05 PM »
that bugs i experience too when i configure shout box for my joomla >:-D 8) ;D :ill: :vampire:

Offline hidden_ghost

  • Semi Newbie
  • *
  • Posts: 8
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: shoutbox new shouts don't appear until go to history
« Reply #6 on: March 08, 2010, 02:48:44 AM »
I changed the language to English 'left to right' but the problem is still present
tu-eng.tk
username test
pass 123456

Offline Sophie

  • Newbie
  • Posts: 2
  • Gender: Female
  • SMF Version: None
  • SP Version: None
Re: shoutbox new shouts don't appear until go to history
« Reply #7 on: March 08, 2010, 09:52:39 AM »
hEY SORRY GUYS I ACTUALLY ....NOTHIN

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: shoutbox new shouts don't appear until go to history
« Reply #8 on: March 08, 2010, 11:50:53 AM »
I changed the language to English 'left to right' but the problem is still present
tu-eng.tk
At least you know that is not the problem.
 
Summary of below:
onShoutReceived (in portal.js) is not checking
1) That its parameter is in fact an object of class XMLHttpRequest, rather than "False"
2) That, if it is an object of class XMLHttpRequest, it actually contains an element with TagName "smf", which contains an element with TagName "shout"
 
I suspect that AJAX is not working the way the SimplePortal shoutbox expects it to. Probably, when the XMLHttpRequest is sent, an error code is coming back.
 
But you are not seeing the error code, because none of the code is set up to display it. To create some debugging messages to tell you what the problem is, you would have to modify portal.js and script.js.
 
----------------------------------------------------------------------------
 
I am no expert on the shoutbox, but I started to look at the file that the error message is talking about.
 
The line it is complaining about is line 95, which is the first executable statement in function onShoutRecieved.
Code: (portal.js) [Select]
function onShoutReceived(XMLDoc)
{
   var shouts = XMLDoc.getElementsByTagName("smf")[0].getElementsByTagName("shout");
....

When I keep looking in the same file, I see that OnShoutReceived is called within sp_submit shout -- actually from sendXMLDocument
Code: (portal.js) [Select]
function sp_submit_shout(shoutbox_id, sSessionVar, sSessionId)
{
 if (window.XMLHttpRequest)
 {
  shoutbox_indicator(shoutbox_id, true);
  var shout_body = "";
  if (portal_smf_version == 1.1)
   shout_body = escape(textToEntities(document.getElementById('new_shout_' + shoutbox_id).value.replace(/&#/g, "&#"))).replace(/\+/g, "%2B");
  else
   shout_body = escape(document.getElementById('new_shout_' + shoutbox_id).value.replace(/&#/g, "&#").php_to8bit()).replace(/\+/g, "%2B");
  sendXMLDocument(smf_prepareScriptUrl(smf_scripturl) + 'action=portal;sa=shoutbox;xml', 'shoutbox_id=' + shoutbox_id + '&shout=' + shout_body + '&' + sSessionVar + '=' + sSessionId, onShoutReceived);

In turn, sendXMLDocument is found in script.js
Code: (script.js) [Select]
function sendXMLDocument(sUrl, sContent, funcCallback)
{
 if (!window.XMLHttpRequest)
  return false;
 var oSendDoc = new window.XMLHttpRequest();
 var oCaller = this;
 if (typeof(funcCallback) != 'undefined')
 {
  oSendDoc.onreadystatechange = function () {
   if (oSendDoc.readyState != 4)
    return;
   if (oSendDoc.responseXML != null && oSendDoc.status == 200)
    funcCallback.call(oCaller, oSendDoc.responseXML);
   else
    funcCallback.call(oCaller, false);
  };
 }
 oSendDoc.open('POST', sUrl, true);
 if ('setRequestHeader' in oSendDoc)
  oSendDoc.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
 oSendDoc.send(sContent);
 return true;
}

So sendXMLDocument creates a function that will call the function funcCallback when the ready state of the XML document it is creating changes.
If readyState is 4 (the request is complete), then the callback function is called.
If the status of the sent XML document is 200, then funcCallback is sent with an argument containing the responseXML of the sent document.
Otherwise, it is sent with an argument of FALSE.
 
It seems to me that onShoutReceived expects to receive an argument that is an object of type XMLDoc, and it expects that object to have an element with TagName "smf" (etc.).
 
The error message says that XMLDoc.getElementsByTagName("smf")[0] is null or not an object.
 
So onShoutReceived has received unexpected parameters.
 
I am thinking that, perhaps
Code: [Select]
  funcCallback.call(oCaller, false);
Was executed. You could test for this, of course, by putting some degugging statements right up at the top of onShoutReceive, to check if XMLDoc == false
 
http://wiki.laptop.org/go/The_call_method_in_JavaScript
http://www.w3schools.com/ajax/ajax_xmlhttprequest.asp
http://www.yaldex.com/wAjax/AcloserlookatHTTPstatuscodes.html
 
 
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline hidden_ghost

  • Semi Newbie
  • *
  • Posts: 8
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: shoutbox new shouts don't appear until go to history
« Reply #9 on: March 08, 2010, 07:50:34 PM »
hEY SORRY GUYS I ACTUALLY ....NOTHIN
hey Sophie
what's your problem  :O

Offline hidden_ghost

  • Semi Newbie
  • *
  • Posts: 8
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: shoutbox new shouts don't appear until go to history
« Reply #10 on: March 08, 2010, 07:55:51 PM »
I changed the language to English 'left to right' but the problem is still present
tu-eng.tk
At least you know that is not the problem.
 
Summary of below:
onShoutReceived (in portal.js) is not checking
1) That its parameter is in fact an object of class XMLHttpRequest, rather than "False"
2) That, if it is an object of class XMLHttpRequest, it actually contains an element with TagName "smf", which contains an element with TagName "shout"
 
I suspect that AJAX is not working the way the SimplePortal shoutbox expects it to. Probably, when the XMLHttpRequest is sent, an error code is coming back.
 
But you are not seeing the error code, because none of the code is set up to display it. To create some debugging messages to tell you what the problem is, you would have to modify portal.js and script.js.
 
----------------------------------------------------------------------------
 
I am no expert on the shoutbox, but I started to look at the file that the error message is talking about.
 
The line it is complaining about is line 95, which is the first executable statement in function onShoutRecieved.
Code: (portal.js) [Select]
function onShoutReceived(XMLDoc)
{
   var shouts = XMLDoc.getElementsByTagName("smf")[0].getElementsByTagName("shout");
....

When I keep looking in the same file, I see that OnShoutReceived is called within sp_submit shout -- actually from sendXMLDocument
Code: (portal.js) [Select]
function sp_submit_shout(shoutbox_id, sSessionVar, sSessionId)
{
 if (window.XMLHttpRequest)
 {
  shoutbox_indicator(shoutbox_id, true);
  var shout_body = "";
  if (portal_smf_version == 1.1)
   shout_body = escape(textToEntities(document.getElementById('new_shout_' + shoutbox_id).value.replace(/&#/g, "&#"))).replace(/\+/g, "%2B");
  else
   shout_body = escape(document.getElementById('new_shout_' + shoutbox_id).value.replace(/&#/g, "&#").php_to8bit()).replace(/\+/g, "%2B");
  sendXMLDocument(smf_prepareScriptUrl(smf_scripturl) + 'action=portal;sa=shoutbox;xml', 'shoutbox_id=' + shoutbox_id + '&shout=' + shout_body + '&' + sSessionVar + '=' + sSessionId, onShoutReceived);

In turn, sendXMLDocument is found in script.js
Code: (script.js) [Select]
function sendXMLDocument(sUrl, sContent, funcCallback)
{
 if (!window.XMLHttpRequest)
  return false;
 var oSendDoc = new window.XMLHttpRequest();
 var oCaller = this;
 if (typeof(funcCallback) != 'undefined')
 {
  oSendDoc.onreadystatechange = function () {
   if (oSendDoc.readyState != 4)
    return;
   if (oSendDoc.responseXML != null && oSendDoc.status == 200)
    funcCallback.call(oCaller, oSendDoc.responseXML);
   else
    funcCallback.call(oCaller, false);
  };
 }
 oSendDoc.open('POST', sUrl, true);
 if ('setRequestHeader' in oSendDoc)
  oSendDoc.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
 oSendDoc.send(sContent);
 return true;
}

So sendXMLDocument creates a function that will call the function funcCallback when the ready state of the XML document it is creating changes.
If readyState is 4 (the request is complete), then the callback function is called.
If the status of the sent XML document is 200, then funcCallback is sent with an argument containing the responseXML of the sent document.
Otherwise, it is sent with an argument of FALSE.
 
It seems to me that onShoutReceived expects to receive an argument that is an object of type XMLDoc, and it expects that object to have an element with TagName "smf" (etc.).
 
The error message says that XMLDoc.getElementsByTagName("smf")[0] is null or not an object.
 
So onShoutReceived has received unexpected parameters.
 
I am thinking that, perhaps
Code: [Select]
  funcCallback.call(oCaller, false);
Was executed. You could test for this, of course, by putting some degugging statements right up at the top of onShoutReceive, to check if XMLDoc == false
 
http://wiki.laptop.org/go/The_call_method_in_JavaScript
http://www.w3schools.com/ajax/ajax_xmlhttprequest.asp
http://www.yaldex.com/wAjax/AcloserlookatHTTPstatuscodes.html


thank you very very much for all of that
but now it seems that the problem is from the host I tried it on my localhost and everything was ok
then I deleted the forum and reinstalled it but the same problem
I want now to know what is the exact problem to tell them about to solve

another time thank you very much

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: shoutbox new shouts don't appear until go to history
« Reply #11 on: March 09, 2010, 12:44:17 PM »
If you are willing to make a small temporary change in script.js, you can find out what error message the host is sending.  Then you can show the problem to your host.
 
When you are done with this testing, you can put the correct version of script.js back on.
 
Do you want to try this?
 
 
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: shoutbox new shouts don't appear until go to history
« Reply #12 on: March 17, 2010, 02:06:08 PM »
hidden_ghost, do you still require assistance with this?
And slowly, you come to realize... It's all as it should be...