Alot of errors with SMF 2.1

Started by mOOwalker, March 30, 2019, 07:30:40 AM

Previous topic - Next topic

mOOwalker

Hello,
I am getting alot of error with SMF 2.1. Ill post them and try to be as more analytical I can be. Some errors I get are:

Type of error: General
Error message: 2: Invalid argument supplied for foreach()
File: /home/infinite/public_html/Sources/Subs.php
Line: 3815
URL of page causing the error: https://www.infinite-guild.eu/index.php?sslRedirect


Trace:
#0: smf_error_handler()
Called from /home/infinite/public_html/Sources/Subs.php on line 3815
#1: template_footer()
Called from /home/infinite/public_html/Sources/Subs.php on line 3301
#2: obExit()
Called from /home/infinite/public_html/Sources/Errors.php on line 375
#3: setup_fatal_error_context()
Called from /home/infinite/public_html/Sources/Errors.php on line 232
#4: fatal_lang_error()
Called from /home/infinite/public_html/Sources/Load.php on line 1897
#5: loadTheme()
Called from /home/infinite/public_html/index.php on line 191
#6: smf_main()
Called from /home/infinite/public_html/index.php on line 151





Type of error: General
Error message: 2: array_reverse() expects parameter 1 to be array, null given
File: /home/infinite/public_html/Sources/Subs.php
Line: 3815
URL of page causing the error: https://www.infinite-guild.eu/index.php?sslRedirect


Trace:
#0: smf_error_handler()
Called from unknown on line -1
#1: array_reverse()
Called from /home/infinite/public_html/Sources/Subs.php on line 3815
#2: template_footer()
Called from /home/infinite/public_html/Sources/Subs.php on line 3301
#3: obExit()
Called from /home/infinite/public_html/Sources/Errors.php on line 375
#4: setup_fatal_error_context()
Called from /home/infinite/public_html/Sources/Errors.php on line 232
#5: fatal_lang_error()
Called from /home/infinite/public_html/Sources/Load.php on line 1897
#6: loadTheme()
Called from /home/infinite/public_html/index.php on line 191
#7: smf_main()
Called from /home/infinite/public_html/index.php on line 151





Type of error: Undefined_vars
Error message: 8: Undefined index: template_layers
File: /home/infinite/public_html/Sources/Subs.php
Line: 3815
URL of page causing the error: https://www.infinite-guild.eu/index.php?sslRedirect


Trace:

#0: smf_error_handler()
Called from /home/infinite/public_html/Sources/Subs.php on line 3815
#1: template_footer()
Called from /home/infinite/public_html/Sources/Subs.php on line 3301
#2: obExit()
Called from /home/infinite/public_html/Sources/Errors.php on line 375
#3: setup_fatal_error_context()
Called from /home/infinite/public_html/Sources/Errors.php on line 232
#4: fatal_lang_error()
Called from /home/infinite/public_html/Sources/Load.php on line 1897
#5: loadTheme()
Called from /home/infinite/public_html/index.php on line 191
#6: smf_main()
Called from /home/infinite/public_html/index.php on line 151


There are more types of errors but I lets me see if I can fix those first:) I am running SMF 2.1 with the following addons:

  • TinyPortal 1.6.2
  • Simple Audio Video Embedder 4.5.3a

Server is Apache 2.4, PHP 7.2 (PHP-FPM) and MariaDB 10.2.

Any ideas how I can fix those?

Antes

Can you clone your site to localhost ? and upgrade to latest cutting-edge version ? https://github.com/SimpleMachines/SMF2.1/archive/release-2.1.zip

@rjen

Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

live627


Arantor


Oldiesmann

You wouldn't happen to be using EhPortal would you? I get a ton of those on one of the sites I help with from the Baidu search engine not picking up the https URLs. I fixed the issue on my sites by enabling the option in Plesk to automatically redirect to https (it's more complicated to do that with cPanel). I haven't had a chance to figure out what else is causing that though.
Michael Eshom
Christian Metal Fans

mOOwalker

Quote from: Arantor on March 30, 2019, 06:11:54 PM
Try SMF 2.1 RC2?

Do I update by downloading an the update bundle (from https://download.simplemachines.org/) or is there a in-forum update like it used to be at 2.0.X version?

Quote from: Oldiesmann on March 31, 2019, 08:18:26 PM
You wouldn't happen to be using EhPortal would you? I get a ton of those on one of the sites I help with from the Baidu search engine not picking up the https URLs. I fixed the issue on my sites by enabling the option in Plesk to automatically redirect to https (it's more complicated to do that with cPanel). I haven't had a chance to figure out what else is causing that though.

No, I am not using it. Only tinyportal.

Arantor

No, download as another big upgrade. You can't get it as a package for the package manager because the changes are too big for it to cope with (and this was true during 2.0 RC as well as 1.1 RC)

I think the commonality is not the portal but the SSL redirect.

mOOwalker

Ok, I did the upgrade and I will report back if there are any errors at all.

Thanks for your help.

mOOwalker

So, after some days I still get errors but abit less tha before. Some for the errors:

Type of error: General
Error message: 2: Invalid argument supplied for foreach()
File: /home/infinite/public_html/Sources/Subs.php
Line: 3815
URL of page causing the error: https://www.infinite-guild.eu/index.php?sslRedirect


#0: smf_error_handler()
Called from /home/infinite/public_html/Sources/Subs.php on line 3815
#1: template_footer()
Called from /home/infinite/public_html/Sources/Subs.php on line 3301
#2: obExit()
Called from /home/infinite/public_html/Sources/Errors.php on line 375
#3: setup_fatal_error_context()
Called from /home/infinite/public_html/Sources/Errors.php on line 232
#4: fatal_lang_error()
Called from /home/infinite/public_html/Sources/Load.php on line 1908
#5: loadTheme()
Called from /home/infinite/public_html/index.php on line 191
#6: smf_main()
Called from /home/infinite/public_html/index.php on line 151





Type of error: General
Error message: 2: array_reverse() expects parameter 1 to be array, null given
File: /home/infinite/public_html/Sources/Subs.php
Line: 3815
URL of page causing the error: https://www.infinite-guild.eu/index.php?sslRedirect


#0: smf_error_handler()
Called from unknown on line -1
#1: array_reverse()
Called from /home/infinite/public_html/Sources/Subs.php on line 3815
#2: template_footer()
Called from /home/infinite/public_html/Sources/Subs.php on line 3301
#3: obExit()
Called from /home/infinite/public_html/Sources/Errors.php on line 375
#4: setup_fatal_error_context()
Called from /home/infinite/public_html/Sources/Errors.php on line 232
#5: fatal_lang_error()
Called from /home/infinite/public_html/Sources/Load.php on line 1908
#6: loadTheme()
Called from /home/infinite/public_html/index.php on line 191
#7: smf_main()
Called from /home/infinite/public_html/index.php on line 151





Type of error: Undefined_vars
Error message: 8: Undefined index: template_layers
File: /home/infinite/public_html/Sources/Subs.php
Line: 3815
URL of page causing the error: https://www.infinite-guild.eu/index.php?sslRedirect
Backtrace information


#0: smf_error_handler()
Called from /home/infinite/public_html/Sources/Subs.php on line 3815
#1: template_footer()
Called from /home/infinite/public_html/Sources/Subs.php on line 3301
#2: obExit()
Called from /home/infinite/public_html/Sources/Errors.php on line 375
#3: setup_fatal_error_context()
Called from /home/infinite/public_html/Sources/Errors.php on line 232
#4: fatal_lang_error()
Called from /home/infinite/public_html/Sources/Load.php on line 1908
#5: loadTheme()
Called from /home/infinite/public_html/index.php on line 191
#6: smf_main()
Called from /home/infinite/public_html/index.php on line 151




Also, I got a critical error:

Type of error: Critical
Error message: The selected search API the forum is using is out of date - falling back to standard search. Please check file SearchAPI-Fulltext.php.
URL of page causing the error: https://www.infinite-guild.eu/index.php?action=profile;area=deleteaccount;save


#0: findSearchAPI()
Called from /home/infinite/public_html/Sources/RemoveTopic.php on line 951
#1: removeMessage()
Called from /home/infinite/public_html/Sources/Profile-Actions.php on line 684
#2: deleteAccount2()
Called from /home/infinite/public_html/Sources/Profile.php on line 650
#3: ModifyProfile()
Called from /home/infinite/public_html/index.php on line 151





Antes


Bigguy

.htaccess may take care of the sslredirect errors.

live627

So why do the sslredirect errors only happen with portals? Am I missing something?

Bigguy

I don't know. I just know when I setup a redirect those errors stopped. It was a step in the process of moving from http to https. That's why I did it.

Arantor

I'd be inclined to set up a forum with SSL but no htaccess redirect and start from there. I don't think it is a portal problem but a bug that wouldn't necessarily have been tested for.

mOOwalker

Quote from: Antes on April 03, 2019, 07:42:47 AM
https://www.simplemachines.org/community/index.php?topic=566687.msg4014020#msg4014020 - check if you applied this fix for critical issue.

Thanks!!

My .htaccess is this:

# php -- BEGIN cPanel-generated handler, do not edit
# Set the "ea-php71" package as the default "PHP" programming language.
<IfModule mime_module>
  AddType application/x-httpd-ea-php71 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit


So there is no redirect happening from htaccess. I could try adding one to see if that gets solved but I doubt its that kind of error.


Sesquipedalian

The root cause of all the errors that refer to line 3815 of Subs.php is that $context['template_layers'] is undefined for some reason. I haven't investigated any further than that, so I have no idea why or how that would happen. But if a portal mod is installed it is not difficult to imagine that the portal might not have been written to handle SMF 2.1's SSL redirection and is somehow screwing up the template layers logic in that particular scenario. Doing interesting things with template logic is key to how portal mods work, after all.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

@rjen

Maybe so, fact is that Tinyportal is running on https sites on 2.1 without errors. Nothing like this reported anywhere else...
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Arantor

Considering it is two different portals, I'm inclined to suggest the portals are a distraction...

Sesquipedalian

This should fix the errors that refer to line 3815 in your reports, m00walker.

However, note that those errors themselves appear to happen while trying to report a different error that has something to do with SSL redirection on your forum, and this fix doesn't do anything to address that.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Advertisement: