Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: xposure on August 21, 2014, 06:33:30 AM

Title: Thousands of callback error messages.....
Post by: xposure on August 21, 2014, 06:33:30 AM
I am getting thousands of error messages on my Forum log inn version SMF 2.0.8

2: preg_replace_callback(): Requires argument 2, 'entity_fix__callback', to be a valid callback

I have no mods on the Forum.

Any ideas?
Title: Re: Thousands of callback error messages.....
Post by: Looking on August 21, 2014, 06:38:22 AM
I did not catch what version your SMF is because of the smiliey face is it 2.0.8? Is your server using PHP 5.5?
Title: Re: Thousands of callback error messages.....
Post by: xposure on August 21, 2014, 06:48:01 AM
Version 2.0.8

I will find out what PHP version my server uses, thanks.
Title: Re: Thousands of callback error messages.....
Post by: Arantor on August 21, 2014, 08:04:26 AM
That actually sounds to me like an incomplete 2.0.8 install.
Title: Re: Thousands of callback error messages.....
Post by: xposure on August 21, 2014, 08:12:22 AM
When I updated to 2.0.8 it said the update was successful.
Title: Re: Thousands of callback error messages.....
Post by: Arantor on August 21, 2014, 08:14:15 AM
Something went wrong because entity_fix__callback should be defined in Subs.php around line 4344.

Makes me wonder what else is broken.
Title: Re: Thousands of callback error messages.....
Post by: xposure on August 21, 2014, 08:22:48 AM
PHP version is version 5.3.41

Thanks
Title: Re: Thousands of callback error messages.....
Post by: Arantor on August 21, 2014, 08:28:14 AM
The PHP version is at this point irrelevant. All the code in 2.0.8 is suitable for any modern version of PHP, it's only *required* for PHP 5.5+.

Your problem is nothing to do with the version of PHP you have. It is because your copy of Subs.php is missing things that it should have. I suspect it is missing other things. Have a look in it for a function called entity_fix__callback, and another one called fixchar__callback or word_break__preg_callback. These things should all be in 2.0.8's copy of Subs.php and the fact you are getting errors suggest they are not.
Title: Re: Thousands of callback error messages.....
Post by: xposure on August 21, 2014, 09:04:44 AM
I have looked in the 'Modify Theme' section of Admin and  I cannot find subs.php??
Title: Re: Thousands of callback error messages.....
Post by: Arantor on August 21, 2014, 09:24:55 AM
It's not part of the theme, nor is it accessible from any part of the admin panel. You will have to examine it by way of your hosting control panel or perhaps via FTP.
Title: Re: Thousands of callback error messages.....
Post by: xposure on August 21, 2014, 10:11:30 AM
I attach subs.php, I downloaded it from my server.

I don't know what I am looking for so any help would be appreciated.

Thanks
Title: Re: Thousands of callback error messages.....
Post by: Arantor on August 21, 2014, 10:14:25 AM
Your Subs.php file is largely consistent with that from 2.0.6 (save for removing the register button). None of the changes from 2.0.7 or 2.0.8 are installed. Neither, I suspect, are other changes from those releases.

Problem is, if you're missing that, you're probably missing other things from 2.0.7 and/or 2.0.8...
Title: Re: Thousands of callback error messages.....
Post by: xposure on August 21, 2014, 10:16:41 AM
Thanks, what can I do?

Also, here is the full error message to see if it helps:

Whatever page or action I do on the Forum generates this:

2: preg_replace_callback(): Requires argument 2, 'entity_fix__callback', to be a valid callback

Apply Filter: Only show the errors from this file

File: /home/www/f22lightning3online.com/community/Sources/Load.php(183) : runtime-created function
Line: 3
Title: Re: Thousands of callback error messages.....
Post by: xposure on August 21, 2014, 10:18:12 AM
I did remove the Register button, hope this hasn't caused the problem?

The Forum works perfectly as well.
Title: Re: Thousands of callback error messages.....
Post by: Arantor on August 21, 2014, 10:18:59 AM
Honestly, I'm tempted to suggest you nuke all your files and replace them with known fresh 2.0.8 files. If you're missing two patches worth of edits in Subs.php, odds are you're missing far more.

http://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files for more information.

This will remove all edits and mods, but it will ensure you have a completely correct set of files.
Title: Re: Thousands of callback error messages.....
Post by: xposure on August 21, 2014, 10:29:08 AM
I have done far too much work to start from scratch  :(

I attach my 'Version' info which looks wrong??
Title: Re: Thousands of callback error messages.....
Post by: xposure on August 21, 2014, 10:48:40 AM
I think I know what I did to cause the problem. When I removed the Register button I edited the subs.php that was on my local machine not realising that it is an older version of the subs.php that was on my Forum as I had upgraded to 2.0.8.

All I need is the subs.php file that comes with version 2.0.8 to overwrite the old subs.php on my Forum.

Can you supply the subs.php from version 2.0.8 please???
Title: Re: Thousands of callback error messages.....
Post by: Arantor on August 21, 2014, 10:50:27 AM
You can get it yourself from the large upgrade package - just download and unzip it, and there it is.
Title: Re: Thousands of callback error messages.....
Post by: xposure on August 21, 2014, 01:20:27 PM
Problem solved, thanks for your help.
Title: Re: Thousands of callback error messages.....
Post by: RGMears on June 28, 2020, 08:43:45 AM
Thanks for this suggestion Arantor. I was having similar troubles with a current upgrade to 2.0.17. Comparing the original with the modified Subs.php file worked to eliminate a lot of errors I was getting.