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: 471
  • 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]

Welcome to SimplePortal.net! You can download SimplePortal from the Downloads Area!

Author Topic: Shoutbox refresh and page reload discrepancy  (Read 104646 times)

0 Members and 4 Guests are viewing this topic.

Offline Ron-KK4HGY

  • Semi Newbie
  • *
  • Posts: 22
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: shoutbox spins
« Reply #60 on: August 08, 2014, 09:08:22 AM »
Browse Packages

Modification Packages
Mod Name   Version   
1.   SMF Gallery Lite   3.7     [ Uninstall ] [ List Files ] [ Delete ]
2.   Remove SMF Logo   1.4     [ Uninstall ] [ List Files ] [ Delete ]
3.   SimplePortal   2.3.5     [ Uninstall ] [ List Files ] [ Delete ]
4.   Menu Editor Lite   1.0.5   [ Install Mod ] [ List Files ] [ Delete ]
5.   Board-color-and-icons   1.1     [ Uninstall ] [ List Files ] [ Delete ]

Using Final BR theme but it does it on other themes as well.
I have been using Chrome - I just tried IE 9 and it worked for the first shout, but I got the spinning circle when I tried a second shout.   Also, don't know if it is related, but when I go to the admin panel and it asked for the pw, it gives me, "Unable to verify referring url. Please go back and try again."  the first time and then works the second time.

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Shoutbox refresh and page reload discrepancy
« Reply #61 on: August 12, 2014, 11:07:19 AM »
If anyone who can reproduce the issue on their online installations and is willing to cooperate, please send me a personal message. I'm hoping to fix this long standing issue once for all and I'd be really grateful for any help debugging the issue.
And slowly, you come to realize... It's all as it should be...

Offline andy

  • On Leave
  • *
  • Posts: 861
  • Gender: Male
    • Outdoor Club Japan (OCJ) アウトドア・クラブ・ジャパン
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
  • Elkarte Version: None
Re: Shoutbox refresh and page reload discrepancy
« Reply #62 on: August 13, 2014, 02:19:16 AM »
Im not using it at the moment but can enable it on my site if you want to take a look.

The one thing I havent tested is just using the default curve theme (suggested by Underdog).
For that I would have to fins a quiet site I have and set up a clean install.

Andy
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Shoutbox refresh and page reload discrepancy
« Reply #63 on: August 13, 2014, 03:19:34 AM »
Are you able to reproduce the issue, all the time? If that's the case, it would really help if you could let me see it on your site.
And slowly, you come to realize... It's all as it should be...

Offline andy

  • On Leave
  • *
  • Posts: 861
  • Gender: Male
    • Outdoor Club Japan (OCJ) アウトドア・クラブ・ジャパン
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
  • Elkarte Version: None
Re: Shoutbox refresh and page reload discrepancy
« Reply #64 on: August 13, 2014, 09:03:18 AM »
It was every time before. Recently variable as I mentioned above.

I will set up and get back to you with login.
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: shoutbox spins
« Reply #65 on: August 13, 2014, 11:35:11 AM »
I'm trying to debug a similar issue reported by other users. Is there any chance you could provide me with temporary access to your forum to test it myself? You can send me a personal message if you would like to cooperate, which would be greatly appreciated.
And slowly, you come to realize... It's all as it should be...

Offline Ron-KK4HGY

  • Semi Newbie
  • *
  • Posts: 22
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: shoutbox spins
« Reply #66 on: August 13, 2014, 01:43:56 PM »
I am happy to help.  I sent you a PM.

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Shoutbox refresh and page reload discrepancy
« Reply #67 on: August 16, 2014, 03:21:54 PM »
I have (hopefully) come up with a fix to the issues described in this topic. Here are the changes required for those who would like to test: (would be very much appreciated)

Themes/default/scripts/portal.js (There are 3 instances. You should replace them all!)

Code: (Find) [Select]
smf_scripturl
Code: (Replace) [Select]
sp_script_url
Code: (Find and Delete) [Select]
var sp_date = new Date;
eval("last_refresh_" + shoutbox_id + " = " + Math.round(sp_date.getTime() / 1000, 0) + ";");

Themes/default/PortalShoutbox.template.php

Code: (Find) [Select]
sp_refresh_shout(', $shoutbox['id'], ', last_refresh_', $shoutbox['id'], ');
Code: (Replace) [Select]
sp_refresh_shout(', $shoutbox['id'], ', last_refresh_', $shoutbox['id'], ');
last_refresh_', $shoutbox['id'], ' += ', $shoutbox['refresh'], ';

Sources/Subs-Portal.php

Code: (Find) [Select]
global $context, $settings, $modSettings;
static $initialized;

if (!empty($initialized))
return;

$context['html_headers'] .= '
<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/portal.js?235"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var sp_images_url = "' . $settings['sp_images_url'] . '";

Code: (Replace) [Select]
global $context, $scripturl, $settings, $modSettings;
static $initialized;

if (!empty($initialized))
return;

$safe_scripturl = $scripturl;
$current_request = empty($_SERVER['HTTP_HOST']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];

if (strpos($scripturl, 'www.') !== false && strpos($current_request, 'www.') === false)
$safe_scripturl = str_replace('://www.', '://', $scripturl);
elseif (strpos($scripturl, 'www.') === false && strpos($current_request, 'www.') !== false)
$safe_scripturl = str_replace('://', '://www.', $scripturl);

$context['html_headers'] .= '
<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/portal.js?235"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var sp_images_url = "' . $settings['sp_images_url'] . '";
var sp_script_url = "' . $safe_scripturl . '";

It is very important that you clear your browser cache after you make the changes and before starting the testing.

For those who are interested, the same changes have been committed to our upcoming version repository at GitHub. So you could grab the latest package from there for testing as well.
And slowly, you come to realize... It's all as it should be...

Offline Ron-KK4HGY

  • Semi Newbie
  • *
  • Posts: 22
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Shoutbox refresh and page reload discrepancy
« Reply #68 on: August 16, 2014, 07:48:59 PM »
How do I grab the latest package from GitHub?

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Shoutbox refresh and page reload discrepancy
« Reply #69 on: August 16, 2014, 11:54:57 PM »
I'll attach it here for you, as SMF usually has problems with GitHub generated packages.
And slowly, you come to realize... It's all as it should be...

Offline Ron-KK4HGY

  • Semi Newbie
  • *
  • Posts: 22
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Shoutbox refresh and page reload discrepancy
« Reply #70 on: August 17, 2014, 12:00:55 AM »
Thanks.  I'll let you know how it works.

Offline Ron-KK4HGY

  • Semi Newbie
  • *
  • Posts: 22
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Shoutbox refresh and page reload discrepancy
« Reply #71 on: August 17, 2014, 12:33:25 AM »
When I tried to upload the package I got this: The file you are uploading already exists on the server. Please delete it first then try again.

I thought I should check here before I delete anything.

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Shoutbox refresh and page reload discrepancy
« Reply #72 on: August 17, 2014, 01:34:57 AM »
You'll have to uninstall the old SimplePortal package. (make sure you don't remove the database changes - that is if you don't want to erase all the portal data) Then just delete the package from your server. After that you can upload this new package and install it to test.
And slowly, you come to realize... It's all as it should be...

Offline Ron-KK4HGY

  • Semi Newbie
  • *
  • Posts: 22
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Shoutbox refresh and page reload discrepancy
« Reply #73 on: August 17, 2014, 09:58:30 AM »
I followed your instructions and now have the new update installed.  So far, so good.  The shoutbox is updating fine now and you have made me a happy camper.  Thanks for all the effort you and the Simple Portal Team put into fixing this problem.

Offline andy

  • On Leave
  • *
  • Posts: 861
  • Gender: Male
    • Outdoor Club Japan (OCJ) アウトドア・クラブ・ジャパン
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
  • Elkarte Version: None
Re: Shoutbox refresh and page reload discrepancy
« Reply #74 on: August 17, 2014, 10:41:09 AM »
Set up 2 accounts for you on our active site - will PM the details in a moment.

Within 24 hours I will hopefully put a clean install of smf and simple portal on another domain I have.
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


Offline andy

  • On Leave
  • *
  • Posts: 861
  • Gender: Male
    • Outdoor Club Japan (OCJ) アウトドア・クラブ・ジャパン
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
  • Elkarte Version: None
Re: Shoutbox refresh and page reload discrepancy
« Reply #75 on: August 17, 2014, 01:34:17 PM »
I set up a clean install of SMF and Simple Portal on a quiet account I have. Its on a pretty standard cheap end host - Bluehost.

http://ichikawa-eikaiwa.com/smf/index.php

Most things are disabled so not a problem for a short time if people want to test the shoutbox.

Sinan has an admin account (same password I PM-ed before).

There are 2 registered accounts:

test1
test2

With the password: testsimpleportal

I will delete in a few days when not needed. Message system and posting is disabled - just for testing the shoutbox.


I installed smf changing only 1 default setting - install for utf-8.
Shoutbox is set to autorefresh every 15 seconds.


I tried and mostly ok but had 1 shout not shown in first few tests.
Andy


Anyone who wants to register on the board can do that and test it...
« Last Edit: August 17, 2014, 01:41:14 PM by andy »
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Shoutbox refresh and page reload discrepancy
« Reply #76 on: August 17, 2014, 05:46:40 PM »
I followed your instructions and now have the new update installed.  So far, so good.  The shoutbox is updating fine now and you have made me a happy camper.  Thanks for all the effort you and the Simple Portal Team put into fixing this problem.

I'm glad that our little mod makes people around the world happy. You're welcome. And thank you too, for helping with debugging and testing!

Set up 2 accounts for you on our active site - will PM the details in a moment.

Within 24 hours I will hopefully put a clean install of smf and simple portal on another domain I have.

I got them, thank you! (and spammed the shoutboxes at both, a little bit) From my understanding there are two issues:

First; if the request URL is not exactly the same as the forum URL, shoutbox fails all the time due to HTTP access control. Example: your site URL http://somsite.com/index.php however the user requests http://www.somesite.com/index.php (or the other way around) (note the www. part). I could reproduce this on both of the sites you linked.

Second; there is a "update shoutbox only when there is some update to shoutbox" mechanism implemented to the shoutbox. I think Nathaniel changed my original code because it kind of didn't work at all and updated shoutbox all the time. What he implemented seems to be failing in certain cases as well - I couldn't pinpoint those though. I could reproduce this only on the second site you linked. (debugging this is a hit and miss)

Anyway, I think I have fixed both with the changes I gave above. SimplePortal_2.3.6_Alpha.zip package I attached above contains the fixes and should be working fine. Maybe you could install that package on your second site (not the active once) so that we can test the fixes to see if they actually fix the issues.

Again, I appreciate the effort you guys put into debugging and testing this issue. Thank you!
And slowly, you come to realize... It's all as it should be...

Offline andy

  • On Leave
  • *
  • Posts: 861
  • Gender: Male
    • Outdoor Club Japan (OCJ) アウトドア・クラブ・ジャパン
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
  • Elkarte Version: None
Re: Shoutbox refresh and page reload discrepancy
« Reply #77 on: August 18, 2014, 01:50:47 AM »
Ok, I installed the SP 2.3.6 alpha package for testing here:

http://ichikawa-eikaiwa.com/smf/
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


Offline andy

  • On Leave
  • *
  • Posts: 861
  • Gender: Male
    • Outdoor Club Japan (OCJ) アウトドア・クラブ・ジャパン
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
  • Elkarte Version: None
Re: Shoutbox refresh and page reload discrepancy
« Reply #78 on: August 18, 2014, 02:03:13 AM »
I tested with Firefox, Opera, Chrome and this is the first time ever none failed... looks like its fixed.
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Shoutbox refresh and page reload discrepancy
« Reply #79 on: August 18, 2014, 11:59:55 PM »
That is great to hear. Thank you guys for the help!
And slowly, you come to realize... It's all as it should be...