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

Installation errors? Mod incompatibilities? Upgrade problems? Make your way over to the Install and Upgrade Support board for all your solutions!

Author Topic: Shoutbox does not load shouts in SMF 2.0.12  (Read 105727 times)

0 Members and 2 Guests are viewing this topic.

Offline rentner

  • Semi Newbie
  • *
  • Posts: 14
  • SMF Version: 2.0.14
  • SP Version: 2.3.6
Re: Shoutbox does not load shouts in SMF 2.0.12
« Reply #40 on: October 02, 2016, 04:09:04 AM »
FYI

I have the same problem with the shoutbox cache after the update 2.0.12, I'm grateful on a buck fixing for this problem.

If I just have disabled the cache for the shoutbox (and it function) but get this message in the error log:


8192: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
Datei: /..../forum/Sources/PortalBlocks.php
Zeile: 2028
PHP 5.6

Offline aegersz

  • Jr. Member
  • **
  • Posts: 58
  • Gender: Male
  • SMF Bulletin Board / Forum Fanatic
    • dopetalk
  • SMF Version: 2.0.15
  • SP Version: 2.3.6
Re: Shoutbox does not load shouts in SMF 2.0.12
« Reply #41 on: October 02, 2016, 06:45:14 AM »
I don't have the extra options for Shoutbox on either and I still get the error too.
"mods" fan (SMF 2.0.15) with 140+ mods (Full List is at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Shoutbox does not load shouts in SMF 2.0.12
« Reply #42 on: October 02, 2016, 08:36:07 PM »
Oh??
I was testing this last night and it seemed to work without the plugin.
After I installed the plugin the issue occurred.
Perhaps if I had tested it longer using more shouts without the plugin..

« Last Edit: October 02, 2016, 11:40:57 PM by Chen Zhen »

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Shoutbox does not load shouts in SMF 2.0.12
« Reply #43 on: October 02, 2016, 08:42:00 PM »
rentner,

You were given a fix for that some time ago:
http://simpleportal.net/index.php?topic=10356.msg68208#msg68208

... also if that error is recurring then I will assume your Simple Portal version is not up to date on what you are displaying.
Download & use the 2.3.6 version from the download link (stable packages) at the top of the forum.

.. although when I just checked your live forum it shows as sp 2.3.6 ??
is this your live forum that the error is showing on or some sort of local/alternate test site?
« Last Edit: October 02, 2016, 08:45:08 PM by Chen Zhen »

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Shoutbox does not load shouts in SMF 2.0.12
« Reply #44 on: October 03, 2016, 12:13:17 AM »

If it is not a bother, please test a default installation of Simple Portal (no plugins) replace the Subs-Portal.php Sources folder attached to this post.
Let me know if it seems to fix the issue.

@aegersz,
Thanks for the quote from Arantor.. spot on about the lengthy array.

.. I did not test this with various scenarios as of yet.
ie. multiple shoutboxes on the same page and such.


Offline rentner

  • Semi Newbie
  • *
  • Posts: 14
  • SMF Version: 2.0.14
  • SP Version: 2.3.6
Re: Shoutbox does not load shouts in SMF 2.0.12
« Reply #45 on: October 03, 2016, 05:42:36 AM »
rentner,

You were given a fix for that some time ago:
http://simpleportal.net/index.php?topic=10356.msg68208#msg68208

... also if that error is recurring then I will assume your Simple Portal version is not up to date on what you are displaying.
Download & use the 2.3.6 version from the download link (stable packages) at the top of the forum.

.. although when I just checked your live forum it shows as sp 2.3.6 ??
is this your live forum that the error is showing on or some sort of local/alternate test site?

Yes of course, sorry you be right, this fixed this problem. I had reinstalled the SP 2.3.6 after the cache problems with SF 2.0.12 and the PortalBlocks.PHP was overwritten again. Now this error message is fix again.

Thanks

PS: Are there any problems expected after disable cache of the shouldbox?
PHP 5.6

Offline phantomm

  • Translator
  • *
  • Posts: 406
  • Gender: Male
  • Smile, tomorrow will be worse...
    • Polish ElkArte community
  • SMF Version: None
  • Elkarte Version: 1.0.5
Re: Shoutbox does not load shouts in SMF 2.0.12
« Reply #46 on: October 04, 2016, 04:06:27 PM »
I can't test this file, because forum is too active right now (I'm using it for few domains with Split Forum Mod), but I did noticed that issue affects shoutbox with lots of messages - new shoutbox is not affected, only problem is with shoutbox with over 169331 messages

and I think that SMF team is aware that there is bug in latest release:
Quote from: nend
As far as the issue, there was a problem with the release and an older revision got released instead of the actual 2.0.12 we had planned. Rest assure we are working on getting the correct revision out soon.

http://www.simplemachines.org/community/index.php?topic=548944.msg3893693#msg3893693
« Last Edit: October 04, 2016, 04:08:36 PM by phantomm »

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Shoutbox does not load shouts in SMF 2.0.12
« Reply #47 on: October 04, 2016, 04:23:25 PM »
The file I posted does not correct the issue.
I was testing it yesterday and its not using the cache properly.
The right idea is there but I did not code it correctly as of yet.
Hopefully a corrected release of SMF will fix the issue else I will mess with it some more to get it working properly.
All one has to do is split up the $shouts array prior to storing it in the cache.. decreasing the length of what is being stored at one time.
Imo in theory it should work.
 

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Shoutbox does not load shouts in SMF 2.0.12
« Reply #48 on: October 05, 2016, 10:29:55 PM »

Here is a new file to test on a default Simple Portal 2.3.6 installation.
Please test this for SP 2.3.6 & SMF 2.0.12
Let me know of any issues.

 

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 does not load shouts in SMF 2.0.12
« Reply #49 on: October 06, 2016, 05:46:14 AM »
So far, with limited testing, this file works for me.

Hope a new update of SP will be released to make it easier for people.
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


Offline emanuele

  • Developer
  • *
  • Posts: 293
Re: Shoutbox does not load shouts in SMF 2.0.12
« Reply #50 on: October 08, 2016, 05:44:10 PM »
I have the feeling what you are doing is worse than disable the cache entirely.

Storing each and every shout in its own file means that for each and every shout you are opening a file on the disk.
I would be surprised if this scenario has any benefit when using the file-based cache (probably 95% of SMF/SP install-base).

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Shoutbox does not load shouts in SMF 2.0.12
« Reply #51 on: October 09, 2016, 05:29:27 PM »

Yes you're right; it makes way too many files doing it that way.
Imo the only other alternative to no cache (using the db) is to create a temporary txt file which is essentially a custom cache.
If SMF 2.0.13 behaves the same can you think of another alternative other than that?

Offline raffo

  • Jr. Member
  • **
  • Posts: 70
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Shoutbox does not load shouts in SMF 2.0.12
« Reply #52 on: November 06, 2016, 03:04:21 PM »
How is possible to disable the cache just for the shoutbox?

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: Shoutbox does not load shouts in SMF 2.0.12
« Reply #53 on: November 11, 2016, 12:09:22 AM »
The solution to this is to completely ignore SMF's internal caching system. SP shouldn't even be using it for the shoutbox.

In Subs-Portal.php, you should add two new functions:

sp_shout_cache_put()
sp_shout_cache_get()

Both would have $shout, $time, $type. I thought about having a $duration or something, but both should be hard coded to 60 minutes. Could pass it to SMF itself and have it as an option in the SP admin settings (cache duration) in minutes.

$shout would be the shout itself, serialized of course and stripped of special characters. Probably could use $smcFunc for it.

$time would be the time the shout was made, preferably in server time. Not sure if SMF has a server_time() function or if its in $smcFunc, could just use time() I guess.

$type is not very important to have. "0" would be standard shout, "1" could be an important message that always appears first or something, if you ever have plans on expanding the shoutbox. "2" could be a moderator shout that persists for an amount of time, or you could even make it so $type is either "allowed" or "banned", or something.

I'm a fan of both a database-based cache and a harddisk file based cache. You can have it output a .php file and put a die() or something if its accessed directly. And then have the entire PHP file just be like a text file. This way people who know the software won't have access to a ton of SP shoutbox caches.

File could be something like sp_shout_cache.php and it could look something like;

Code: [Select]
<?php

/*
Simple Portal Shoutbox Cache
THIS FILE IS AUTOMATICALLY GENERATED
*/


if (!
defined('SMF'))
die('Hacking attempt...');

function 
sp_cached_shouts()
{
// this array stores all the shouts used for the cache
$shouts = array();

// each shout increments the array
$shout[] = array(1'Sayaka''This is a shout!''11102016115933');
$shout[] = array(1'Sayaka''I love talking to myself''11102016115937');
$shout[] = array(1'Sayaka''Yeah it\'s pretty interesting''11102016115939');
$shout[] = array(1'Sayaka''You don\'t say?''11102016115953');

// if there are no shouts, it will always return empty
return $shouts;
}

?>

sp_shout_cache_put() would write shouts with the proper information to this file. It would use fwrite() and write to the file locally. For the pointer, it would look for the comment "// each shout increments the array" and then it increments from there since the array is being appended each time.

sp_shout_cache_get() would be a bit easier because we wrote the cache file to php and it already returns an array. So you can call the file and then use sp_cached_shouts. The reason we just don't call it directly via an include is so we can do some work beforehand, like checking times or cleaning the shouts.

Offline raffo

  • Jr. Member
  • **
  • Posts: 70
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Shoutbox does not load shouts in SMF 2.0.12
« Reply #54 on: November 13, 2016, 06:23:31 AM »
To make a resume: what is a friendly solution for a common user who doesn't know and manage the php code very well (I can insert code and modify, but low profile)?

Offline emanuele

  • Developer
  • *
  • Posts: 293
Re: Shoutbox does not load shouts in SMF 2.0.12
« Reply #55 on: November 13, 2016, 07:36:15 AM »
Disable the caching.
That anyway is mostly pointless unless you have a **very** busy forum (I wouldn't even consider the "very crappy host" position, because in that case you'll likely use a file-based cache, and that would be even detrimental in comparison to the no-cache option).

Offline newtoallthis

  • Jr. Member
  • **
  • Posts: 94
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Shoutbox does not load shouts in SMF 2.0.12
« Reply #56 on: November 25, 2016, 04:25:09 PM »
I uninstalled the 2.0.12 patch and it's working fine again. I hope this is an easy fix.

Just got this from SMF.

Go back to 2.0.11
They are working on a patch for this in 2.0.13
SMF 2.0 Gold
SP 2.3.3

Offline aegersz

  • Jr. Member
  • **
  • Posts: 58
  • Gender: Male
  • SMF Bulletin Board / Forum Fanatic
    • dopetalk
  • SMF Version: 2.0.15
  • SP Version: 2.3.6
Re: Shoutbox does not load shouts in SMF 2.0.12
« Reply #57 on: January 12, 2017, 01:39:09 AM »
2.0.13 patch is out now.

I did try it on my test system but I see to have the same problem as documented here.

BUT if i prune my Shoutbox then it all works. Cool, i i sacrifice my chat log if need be.

Note: clearing the forum cache (as mentioned below) did not work for me.
« Last Edit: January 19, 2017, 11:33:47 AM by aegersz »
"mods" fan (SMF 2.0.15) with 140+ mods (Full List is at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline phantomm

  • Translator
  • *
  • Posts: 406
  • Gender: Male
  • Smile, tomorrow will be worse...
    • Polish ElkArte community
  • SMF Version: None
  • Elkarte Version: 1.0.5
Re: Shoutbox does not load shouts in SMF 2.0.12
« Reply #58 on: January 14, 2017, 08:06:15 PM »
for everyone else - after update to 2.0.13 clear your forum cache and shoutbox will work just fine :)
« Last Edit: January 14, 2017, 08:08:55 PM by phantomm »